Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
docs: add ast-spec, type-utils docs with docusaurus-plugin-typedoc#9293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
1ea35739b6b2e20924498584df32d0c8ce70db3d52f9580091698570dda405acf490b19fe744830218167185b7e15c0870258419efa89b9e0e8f79ddd17e7ae73bc3fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,31 @@ | ||
| --- | ||
| id: type-utils | ||
| sidebar_label: type-utils | ||
| toc_max_heading_level: 3 | ||
| --- | ||
| import GeneratedDocs from './type-utils/generated/index.md'; | ||
| # `@typescript-eslint/type-utils` | ||
| <PackageLink packageName="type-utils" scope="@typescript-eslint" /> | ||
| > Type utilities for working with TypeScripttypes ✨ | ||
| This package contains public utilities for working with TypeScript types. | ||
| Rules declared in [`@typescript-eslint/eslint-plugin`](./ESLint_Plugin.mdx) use these utility functions. | ||
| The utilities in this package are both: | ||
| - More generally ESLint-focused than the broad TypeScript utilities in [`ts-api-utils`](https://npmjs.com/package/ts-api-utils) | ||
| - Separated from [`@typescript-eslint/utils`](./Utils.mdx) so that that package does not require a dependency on `typescript` | ||
| :::tip | ||
| See [Custom Rules](../developers/Custom_Rules.mdx) for documentation on creating your own custom ESLint rules for TypeScript code. | ||
| ::: | ||
| --- | ||
| The following documentation is auto-generated from source code. | ||
| <GeneratedDocs /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| --- | ||
| id: utils | ||
| sidebar_label: utils | ||
| toc_max_heading_level: 3 | ||
| --- | ||
| # `@typescript-eslint/utils` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| id: ast-spec | ||
| sidebar_label: AST Specification | ||
| toc_max_heading_level: 3 | ||
| --- | ||
| import GeneratedDocs from '../ast-spec/generated/index.md'; | ||
| # AST Specification | ||
| The following auto-generated documentation describes the Abstract Syntax Tree (AST) generated by [`@typescript-eslint/typescript-estree`](../TypeScript_ESTree.mdx) for parsers such as [`@typescript-eslint/parser`](../Parser.mdx). | ||
| <GeneratedDocs /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -88,9 +88,9 @@ export enum AST_NODE_TYPES { | ||
| WhileStatement = 'WhileStatement', | ||
| WithStatement = 'WithStatement', | ||
| YieldExpression = 'YieldExpression', | ||
| // TS_prefixed nodes | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. | ||
| TSAbstractAccessorProperty = 'TSAbstractAccessorProperty', | ||
| TSAbstractKeyword = 'TSAbstractKeyword', | ||
| TSAbstractMethodDefinition = 'TSAbstractMethodDefinition', | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -6,14 +6,9 @@ export interface NodeOrTokenData { | ||
| * The source location information of the node. | ||
| * | ||
| * The loc property is defined as nullable by ESTree, but ESLint requires this property. | ||
| */ | ||
| loc: SourceLocation; | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. These | ||
| range: Range; | ||
| type: string; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -7,15 +7,17 @@ export interface TSEnumDeclaration extends BaseNode { | ||
| type: AST_NODE_TYPES.TSEnumDeclaration; | ||
| /** | ||
| * Whether this is a `const` enum. | ||
| * @example | ||
| * ```ts | ||
| * const enum Foo {} | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Invalid TS syntax in The Markdown in question: ####Properties| Property| Type| Description| Overrides|| :------| :------| :------| :------||`const`|`boolean`| <p>Whether this is a`const` enum.</p><p>**Example**</p><code>const enum Foo {...}</code>| -||`declare`|`boolean`| <p>Whether this is a`declare`d enum.</p><p>**Example**</p><code>declare enum Foo {...}</code>| -||`id`|[`Identifier`](index.md#identifier)| The enum name.| -||`members`|[`TSEnumMember`](index.md#tsenummember)[]| The enum members.| -||`type`|`TSEnumDeclaration`| -|[`BaseNode`](index.md#basenode).`type`|*** ...where the issue is on the | ||
| * ``` | ||
| */ | ||
| const: boolean; | ||
| /** | ||
| * Whether this is a `declare`d enum. | ||
| * @example | ||
| * ```ts | ||
| * declare enum Foo {} | ||
| * ``` | ||
| */ | ||
| declare: boolean; | ||
Uh oh!
There was an error while loading.Please reload this page.
