Skip to content

Commit

Permalink
Walkthrough updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed Sep 23, 2024
1 parent f31e2ac commit a88188b
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 75 deletions.
2 changes: 1 addition & 1 deletion packages/docs/dist-build/scripts/components/Examples.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface ExamplesProps {
tsdocComment?: DocComment;
};
}
export declare function Examples(props: ExamplesProps): import("@alloy-js/core").ComponentCreator<import("./MdxSection.js").MdxSectionProps> | "";
export declare function Examples(props: ExamplesProps): "" | import("@alloy-js/core").ComponentCreator<import("./MdxSection.js").MdxSectionProps>;
//# sourceMappingURL=Examples.d.ts.map
2 changes: 1 addition & 1 deletion packages/docs/dist-build/scripts/components/Remarks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface RemarksProps {
tsdocComment?: DocComment;
};
}
export declare function Remarks(props: RemarksProps): import("@alloy-js/core").ComponentCreator<import("./MdxSection.js").MdxSectionProps> | "";
export declare function Remarks(props: RemarksProps): "" | import("@alloy-js/core").ComponentCreator<import("./MdxSection.js").MdxSectionProps>;
//# sourceMappingURL=Remarks.d.ts.map
2 changes: 1 addition & 1 deletion packages/docs/dist-build/scripts/components/Summary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface SummaryProps {
tsdocComment?: DocComment;
};
}
export declare function Summary(props: SummaryProps): import("@alloy-js/core").ComponentCreator<import("./MdxParagraph.js").MdxParagraphProps> | "";
export declare function Summary(props: SummaryProps): "" | import("@alloy-js/core").ComponentCreator<import("./MdxParagraph.js").MdxParagraphProps>;
//# sourceMappingURL=Summary.d.ts.map
2 changes: 1 addition & 1 deletion packages/docs/dist-build/scripts/components/TsDoc.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/docs/dist-build/scripts/components/TsDoc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/docs/dist-build/scripts/components/TsDoc.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import type { ApiInterface } from "@microsoft/api-extractor-model";
export interface ComponentPropsProps {
propType?: ApiInterface;
}
export declare function ComponentProps(props: ComponentPropsProps): import("@alloy-js/core").ComponentCreator<import("../MdxSection.js").MdxSectionProps> | "";
export declare function ComponentProps(props: ComponentPropsProps): "" | import("@alloy-js/core").ComponentCreator<import("../MdxSection.js").MdxSectionProps>;
//# sourceMappingURL=ComponentProps.d.ts.map
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import type { ApiFunction } from "@microsoft/api-extractor-model";
export interface FunctionOptionsProps {
fn: ApiFunction;
}
export declare function FunctionOptions(props: FunctionOptionsProps): import("@alloy-js/core").ComponentCreator<import("../MdxSection.js").MdxSectionProps> | "";
export declare function FunctionOptions(props: FunctionOptionsProps): "" | import("@alloy-js/core").ComponentCreator<import("../MdxSection.js").MdxSectionProps>;
//# sourceMappingURL=FunctionOptions.d.ts.map
2 changes: 1 addition & 1 deletion packages/docs/src/content/docs/guides/basic-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ When you create a declarations, you need to provide the declaration name, and op

One of the more challenging bits of doing codegen is generating references to things you've declared. Alloy makes this painless with refkeys. A refkey is a unique identifier for a symbol you declare in your output code. When you reference a refkey, Alloy calculates the necessary reference syntax along with any imports, package dependencies, or other such things needed for the reference to work.

You can create a refkey by calling `refkey()`. Every time this function is called, you get a new refkey.
You can create a refkey by calling `refkey()`. Every time this function is called with no arguments, you get a new refkey.

Often you want to create a declaration for a JavaScript value you're holding, like a schema you're converting to source text. In these cases, you don't need to pass along the refkey separately. Instead, you can call `refkey(schemaObj)`, and you'll get the same refkey whenever you pass the same schema.

Expand Down
Loading

0 comments on commit a88188b

Please sign in to comment.