Urara-Blog/node_modules/.pnpm-store/v3/files/2f/1e5ad9f2100ea724d0be3838b8b27bee54e4c8e9805bcbd697c1bf3a33bc99e60a5a7b611d03ab3fcc9bfb1bd05a6c69f73d11c80088470ccb977d4ae1d128
2022-08-14 01:14:53 +08:00

62 lines
No EOL
2.2 KiB
Text

import { TSESTree, EcmaVersion, Lib } from '@typescript-eslint/types';
import { ReferencerOptions } from './referencer';
import { ScopeManager } from './ScopeManager';
interface AnalyzeOptions {
/**
* Known visitor keys.
*/
childVisitorKeys?: ReferencerOptions['childVisitorKeys'];
/**
* Which ECMAScript version is considered.
* Defaults to `2018`.
* `'latest'` is converted to 1e8 at parser.
*/
ecmaVersion?: EcmaVersion | 1e8;
/**
* Whether the whole script is executed under node.js environment.
* When enabled, the scope manager adds a function scope immediately following the global scope.
* Defaults to `false`.
*/
globalReturn?: boolean;
/**
* Implied strict mode (if ecmaVersion >= 5).
* Defaults to `false`.
*/
impliedStrict?: boolean;
/**
* The identifier that's used for JSX Element creation (after transpilation).
* This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement").
* Defaults to `"React"`.
*/
jsxPragma?: string | null;
/**
* The identifier that's used for JSX fragment elements (after transpilation).
* If `null`, assumes transpilation will always use a member on `jsxFactory` (i.e. React.Fragment).
* This should not be a member expression - just the root identifier (i.e. use "h" instead of "h.Fragment").
* Defaults to `null`.
*/
jsxFragmentName?: string | null;
/**
* The lib used by the project.
* This automatically defines a type variable for any types provided by the configured TS libs.
* Defaults to the lib for the provided `ecmaVersion`.
*
* https://www.typescriptlang.org/tsconfig#lib
*/
lib?: Lib[];
/**
* The source type of the script.
*/
sourceType?: 'script' | 'module';
/**
* Emit design-type metadata for decorated declarations in source.
* Defaults to `false`.
*/
emitDecoratorMetadata?: boolean;
}
/**
* Takes an AST and returns the analyzed scopes.
*/
declare function analyze(tree: TSESTree.Node, providedOptions?: AnalyzeOptions): ScopeManager;
export { analyze, AnalyzeOptions };
//# sourceMappingURL=analyze.d.ts.map