镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[api extractor] support module variable and type - #964

Closed
adventure-yunfei (adventure-yunfei) wants to merge 2 commits into
microsoft:masterfrom
adventure-yunfei:feature/api-extractor/support-module-variable-and-type
Closed

adventure-yunfei (adventure-yunfei) wants to merge 2 commits into
microsoft:masterfrom
adventure-yunfei:feature/api-extractor/support-module-variable-and-type

Conversation

@adventure-yunfei

Copy link
Copy Markdown
Contributor

Supports:

  • the module variable case (when "namespaceSupport" is configured as "permissive"):
export const foo: number = 1;
export let bar: { m: boolean; } = { m: 1};

(But does not support old es5 var keywords).

  • the "type" declaration case:
export type A = number;
export type B = A & { m: boolean; };

With these two cases support, at least all of the exported items are listed inside the apis (along with later api-documenter feature support).

Please let me know if this PR is proper, since these features may not be common, and seems api-extractor 7 is coming?

If the PR can be merged, I'll continue to run rush build and try to provide more test cases (I've tested with my entire project, and a demo project).

@octogonz

Copy link
Copy Markdown
Collaborator

Please let me know if this PR is proper, since these features may not be common, and seems api-extractor 7 is coming?

adventure-yunfei (@adventure-yunfei) I've published a preliminary "beta" release of AE7. You can install it like this:

npm install -g @microsoft/api-documenter@beta
npm install -g @microsoft/api-extractor@beta

I haven't tested these scenarios completely yet, but the main plumbing for handling them is all in place.
This release is pretty rough around the edges, but we're interested in early feedback. I'll send a broader announcement once we've worked through a small punch list of final work items.

@adventure-yunfei

adventure-yunfei (adventure-yunfei) commented Nov 29, 2018 •

Copy link
Copy Markdown
Contributor Author

Perfect! I'll first test against the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants