main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

22
node_modules/@typescript-eslint/parser/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
TypeScript ESLint Parser
Copyright JS Foundation and other contributors, https://js.foundation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

12
node_modules/@typescript-eslint/parser/README.md generated vendored Normal file
View File

@@ -0,0 +1,12 @@
# `@typescript-eslint/parser`
> An ESLint parser which leverages <a href="https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/typescript-estree">TypeScript ESTree</a> to allow for ESLint to lint TypeScript source code.
[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser)
[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser)
👉 See **https://typescript-eslint.io/packages/parser** for documentation on this package.
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
<!-- Local path for docs: docs/packages/Parser.mdx -->

View File

@@ -0,0 +1,8 @@
export { parse, parseForESLint, ParserOptions } from './parser';
export { ParserServices, ParserServicesWithTypeInformation, ParserServicesWithoutTypeInformation, clearCaches, createProgram, } from '@typescript-eslint/typescript-estree';
export declare const version: string;
export declare const meta: {
name: string;
version: string;
};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EACL,cAAc,EACd,iCAAiC,EACjC,oCAAoC,EACpC,WAAW,EACX,aAAa,GACd,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC;AAElE,eAAO,MAAM,IAAI;;;CAGhB,CAAC"}

17
node_modules/@typescript-eslint/parser/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.meta = exports.version = exports.createProgram = exports.clearCaches = exports.parseForESLint = exports.parse = void 0;
var parser_1 = require("./parser");
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parser_1.parse; } });
Object.defineProperty(exports, "parseForESLint", { enumerable: true, get: function () { return parser_1.parseForESLint; } });
var typescript_estree_1 = require("@typescript-eslint/typescript-estree");
Object.defineProperty(exports, "clearCaches", { enumerable: true, get: function () { return typescript_estree_1.clearCaches; } });
Object.defineProperty(exports, "createProgram", { enumerable: true, get: function () { return typescript_estree_1.createProgram; } });
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
exports.version = require('../package.json').version;
exports.meta = {
name: 'typescript-eslint/parser',
version: exports.version,
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAgE;AAAvD,+FAAA,KAAK,OAAA;AAAE,wGAAA,cAAc,OAAA;AAC9B,0EAM8C;AAF5C,gHAAA,WAAW,OAAA;AACX,kHAAA,aAAa,OAAA;AAGf,sHAAsH;AACtH,+GAA+G;AAClG,QAAA,OAAO,GAAW,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AAErD,QAAA,IAAI,GAAG;IAClB,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAP,eAAO;CACR,CAAC"}

View File

@@ -0,0 +1,20 @@
import type { ScopeManager } from '@typescript-eslint/scope-manager';
import type { TSESTree } from '@typescript-eslint/types';
import { ParserOptions } from '@typescript-eslint/types';
import type { ParserServices } from '@typescript-eslint/typescript-estree';
import { visitorKeys } from '@typescript-eslint/visitor-keys';
import type * as ts from 'typescript';
interface ParseForESLintResult {
ast: TSESTree.Program & {
range?: [number, number];
tokens?: TSESTree.Token[];
comments?: TSESTree.Comment[];
};
services: ParserServices;
visitorKeys: typeof visitorKeys;
scopeManager: ScopeManager;
}
declare function parse(code: ts.SourceFile | string, options?: ParserOptions): ParseForESLintResult['ast'];
declare function parseForESLint(code: ts.SourceFile | string, options?: ParserOptions | null): ParseForESLintResult;
export { parse, parseForESLint, ParserOptions };
//# sourceMappingURL=parser.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAO,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAKtC,UAAU,oBAAoB;IAC5B,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG;QACtB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACzB,MAAM,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;KAC/B,CAAC;IACF,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAmDD,iBAAS,KAAK,CACZ,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,EAC5B,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC,KAAK,CAAC,CAE7B;AAED,iBAAS,cAAc,CACrB,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,EAC5B,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,GAC7B,oBAAoB,CAqFtB;AAED,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}

130
node_modules/@typescript-eslint/parser/dist/parser.js generated vendored Normal file
View File

@@ -0,0 +1,130 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseForESLint = exports.parse = void 0;
const scope_manager_1 = require("@typescript-eslint/scope-manager");
const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
const visitor_keys_1 = require("@typescript-eslint/visitor-keys");
const debug_1 = __importDefault(require("debug"));
const typescript_1 = require("typescript");
const log = (0, debug_1.default)('typescript-eslint:parser:parser');
function validateBoolean(value, fallback = false) {
if (typeof value !== 'boolean') {
return fallback;
}
return value;
}
const LIB_FILENAME_REGEX = /lib\.(.+)\.d\.[cm]?ts$/;
function getLib(compilerOptions) {
if (compilerOptions.lib) {
return compilerOptions.lib.reduce((acc, lib) => {
const match = LIB_FILENAME_REGEX.exec(lib.toLowerCase());
if (match) {
acc.push(match[1]);
}
return acc;
}, []);
}
const target = compilerOptions.target ?? typescript_1.ScriptTarget.ES5;
// https://github.com/microsoft/TypeScript/blob/ae582a22ee1bb052e19b7c1bc4cac60509b574e0/src/compiler/utilitiesPublic.ts#L13-L36
switch (target) {
case typescript_1.ScriptTarget.ESNext:
return ['esnext.full'];
case typescript_1.ScriptTarget.ES2022:
return ['es2022.full'];
case typescript_1.ScriptTarget.ES2021:
return ['es2021.full'];
case typescript_1.ScriptTarget.ES2020:
return ['es2020.full'];
case typescript_1.ScriptTarget.ES2019:
return ['es2019.full'];
case typescript_1.ScriptTarget.ES2018:
return ['es2018.full'];
case typescript_1.ScriptTarget.ES2017:
return ['es2017.full'];
case typescript_1.ScriptTarget.ES2016:
return ['es2016.full'];
case typescript_1.ScriptTarget.ES2015:
return ['es6'];
default:
return ['lib'];
}
}
function parse(code, options) {
return parseForESLint(code, options).ast;
}
exports.parse = parse;
function parseForESLint(code, options) {
if (!options || typeof options !== 'object') {
options = {};
}
else {
options = { ...options };
}
// https://eslint.org/docs/user-guide/configuring#specifying-parser-options
// if sourceType is not provided by default eslint expect that it will be set to "script"
if (options.sourceType !== 'module' && options.sourceType !== 'script') {
options.sourceType = 'script';
}
if (typeof options.ecmaFeatures !== 'object') {
options.ecmaFeatures = {};
}
const parserOptions = {};
Object.assign(parserOptions, options, {
jsx: validateBoolean(options.ecmaFeatures.jsx),
});
const analyzeOptions = {
globalReturn: options.ecmaFeatures.globalReturn,
jsxPragma: options.jsxPragma,
jsxFragmentName: options.jsxFragmentName,
lib: options.lib,
sourceType: options.sourceType,
};
/**
* Allow the user to suppress the warning from typescript-estree if they are using an unsupported
* version of TypeScript
*/
const warnOnUnsupportedTypeScriptVersion = validateBoolean(options.warnOnUnsupportedTypeScriptVersion, true);
if (!warnOnUnsupportedTypeScriptVersion) {
parserOptions.loggerFn = false;
}
const { ast, services } = (0, typescript_estree_1.parseAndGenerateServices)(code, parserOptions);
ast.sourceType = options.sourceType;
let emitDecoratorMetadata = options.emitDecoratorMetadata === true;
if (services.program) {
// automatically apply the options configured for the program
const compilerOptions = services.program.getCompilerOptions();
if (analyzeOptions.lib == null) {
analyzeOptions.lib = getLib(compilerOptions);
log('Resolved libs from program: %o', analyzeOptions.lib);
}
if (analyzeOptions.jsxPragma === undefined &&
compilerOptions.jsxFactory != null) {
// in case the user has specified something like "preact.h"
const factory = compilerOptions.jsxFactory.split('.')[0].trim();
analyzeOptions.jsxPragma = factory;
log('Resolved jsxPragma from program: %s', analyzeOptions.jsxPragma);
}
if (analyzeOptions.jsxFragmentName === undefined &&
compilerOptions.jsxFragmentFactory != null) {
// in case the user has specified something like "preact.Fragment"
const fragFactory = compilerOptions.jsxFragmentFactory
.split('.')[0]
.trim();
analyzeOptions.jsxFragmentName = fragFactory;
log('Resolved jsxFragmentName from program: %s', analyzeOptions.jsxFragmentName);
}
if (compilerOptions.emitDecoratorMetadata === true) {
emitDecoratorMetadata = true;
}
}
if (emitDecoratorMetadata) {
analyzeOptions.emitDecoratorMetadata = true;
}
const scopeManager = (0, scope_manager_1.analyze)(ast, analyzeOptions);
return { ast, services, scopeManager, visitorKeys: visitor_keys_1.visitorKeys };
}
exports.parseForESLint = parseForESLint;
//# sourceMappingURL=parser.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":";;;;;;AAIA,oEAA2D;AAO3D,4EAAgF;AAChF,kEAA8D;AAC9D,kDAA0B;AAE1B,2CAA0C;AAE1C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AAI,IAAI,EAC1C,CAAC;YACD,kEAAkE;YAClE,MAAM,WAAW,GAAG,eAAe,CAAC,kBAAkB;iBACnD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;iBACb,IAAI,EAAE,CAAC;YACV,cAAc,CAAC,eAAe,GAAG,WAAW,CAAC;YAC7C,GAAG,CACD,2CAA2C,EAC3C,cAAc,CAAC,eAAe,CAC/B,CAAC;QACJ,CAAC;QACD,IAAI,eAAe,CAAC,qBAAqB,KAAK,IAAI,EAAE,CAAC;YACnD,qBAAqB,GAAG,IAAI,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,IAAI,qBAAqB,EAAE,CAAC;QAC1B,cAAc,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAC9C,CAAC;IAED,MAAM,YAAY,GAAG,IAAA,uBAAO,EAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAElD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAX,0BAAW,EAAE,CAAC;AACtD,CAAC;AAEe,wCAAc"}

85
node_modules/@typescript-eslint/parser/package.json generated vendored Normal file
View File

@@ -0,0 +1,85 @@
{
"name": "@typescript-eslint/parser",
"version": "6.21.0",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [
"dist",
"_ts4.3",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/parser"
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"license": "BSD-2-Clause",
"keywords": [
"ast",
"ecmascript",
"javascript",
"typescript",
"parser",
"syntax",
"eslint"
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "npx nx lint",
"test": "jest --coverage",
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0"
},
"dependencies": {
"@typescript-eslint/scope-manager": "6.21.0",
"@typescript-eslint/types": "6.21.0",
"@typescript-eslint/typescript-estree": "6.21.0",
"@typescript-eslint/visitor-keys": "6.21.0",
"debug": "^4.3.4"
},
"devDependencies": {
"@types/glob": "*",
"downlevel-dts": "*",
"glob": "*",
"jest": "29.7.0",
"prettier": "^3.0.3",
"rimraf": "*",
"typescript": "*"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"typesVersions": {
"<4.7": {
"*": [
"_ts4.3/*"
]
}
}
}

21
node_modules/@typescript-eslint/scope-manager/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 typescript-eslint and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,10 @@
# `@typescript-eslint/scope-manager`
[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager)
[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager)
👉 See **https://typescript-eslint.io/packages/scope-manager** for documentation on this package.
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
<!-- Local path for docs: docs/packages/Scope_Manager.mdx -->

View File

@@ -0,0 +1,4 @@
declare function createIdGenerator(): () => number;
declare function resetIds(): void;
export { createIdGenerator, resetIds };
//# sourceMappingURL=ID.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ID.d.ts","sourceRoot":"","sources":["../src/ID.ts"],"names":[],"mappings":"AAGA,iBAAS,iBAAiB,IAAI,MAAM,MAAM,CAUzC;AAED,iBAAS,QAAQ,IAAI,IAAI,CAExB;AAED,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC"}

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resetIds = exports.createIdGenerator = void 0;
const ID_CACHE = new Map();
let NEXT_KEY = 0;
function createIdGenerator() {
const key = (NEXT_KEY += 1);
ID_CACHE.set(key, 0);
return () => {
const current = ID_CACHE.get(key) ?? 0;
const next = current + 1;
ID_CACHE.set(key, next);
return next;
};
}
exports.createIdGenerator = createIdGenerator;
function resetIds() {
ID_CACHE.clear();
}
exports.resetIds = resetIds;
//# sourceMappingURL=ID.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ID.js","sourceRoot":"","sources":["../src/ID.ts"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC3C,IAAI,QAAQ,GAAG,CAAC,CAAC;AAEjB,SAAS,iBAAiB;IACxB,MAAM,GAAG,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;IAC5B,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAErB,OAAO,GAAW,EAAE;QAClB,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,CAAC;QACzB,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAMQ,8CAAiB;AAJ1B,SAAS,QAAQ;IACf,QAAQ,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC;AAE2B,4BAAQ"}

View File

@@ -0,0 +1,72 @@
import type { SourceType, TSESTree } from '@typescript-eslint/types';
import type { Scope } from './scope';
import { BlockScope, CatchScope, ClassScope, ConditionalTypeScope, ForScope, FunctionExpressionNameScope, FunctionScope, FunctionTypeScope, GlobalScope, MappedTypeScope, ModuleScope, SwitchScope, TSEnumScope, TSModuleScope, TypeScope, WithScope } from './scope';
import { ClassFieldInitializerScope } from './scope/ClassFieldInitializerScope';
import { ClassStaticBlockScope } from './scope/ClassStaticBlockScope';
import type { Variable } from './variable';
interface ScopeManagerOptions {
globalReturn?: boolean;
sourceType?: SourceType;
impliedStrict?: boolean;
}
/**
* @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface
*/
declare class ScopeManager {
#private;
currentScope: Scope | null;
readonly declaredVariables: WeakMap<TSESTree.Node, Variable[]>;
/**
* The root scope
*/
globalScope: GlobalScope | null;
readonly nodeToScope: WeakMap<TSESTree.Node, Scope[]>;
/**
* All scopes
* @public
*/
readonly scopes: Scope[];
get variables(): Variable[];
constructor(options: ScopeManagerOptions);
isGlobalReturn(): boolean;
isModule(): boolean;
isImpliedStrict(): boolean;
isStrictModeSupported(): boolean;
isES6(): boolean;
/**
* Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node.
* If the node does not define any variable, this returns an empty array.
* @param node An AST node to get their variables.
*/
getDeclaredVariables(node: TSESTree.Node): Variable[];
/**
* Get the scope of a given AST node. The gotten scope's `block` property is the node.
* This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`.
*
* @param node An AST node to get their scope.
* @param inner If the node has multiple scopes, this returns the outermost scope normally.
* If `inner` is `true` then this returns the innermost scope.
*/
acquire(node: TSESTree.Node, inner?: boolean): Scope | null;
protected nestScope<T extends Scope>(scope: T): T;
nestBlockScope(node: BlockScope['block']): BlockScope;
nestCatchScope(node: CatchScope['block']): CatchScope;
nestClassScope(node: ClassScope['block']): ClassScope;
nestClassFieldInitializerScope(node: ClassFieldInitializerScope['block']): ClassFieldInitializerScope;
nestClassStaticBlockScope(node: ClassStaticBlockScope['block']): ClassStaticBlockScope;
nestConditionalTypeScope(node: ConditionalTypeScope['block']): ConditionalTypeScope;
nestForScope(node: ForScope['block']): ForScope;
nestFunctionExpressionNameScope(node: FunctionExpressionNameScope['block']): FunctionExpressionNameScope;
nestFunctionScope(node: FunctionScope['block'], isMethodDefinition: boolean): FunctionScope;
nestFunctionTypeScope(node: FunctionTypeScope['block']): FunctionTypeScope;
nestGlobalScope(node: GlobalScope['block']): GlobalScope;
nestMappedTypeScope(node: MappedTypeScope['block']): MappedTypeScope;
nestModuleScope(node: ModuleScope['block']): ModuleScope;
nestSwitchScope(node: SwitchScope['block']): SwitchScope;
nestTSEnumScope(node: TSEnumScope['block']): TSEnumScope;
nestTSModuleScope(node: TSModuleScope['block']): TSModuleScope;
nestTypeScope(node: TypeScope['block']): TypeScope;
nestWithScope(node: WithScope['block']): WithScope;
}
export { ScopeManager };
//# sourceMappingURL=ScopeManager.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ScopeManager.d.ts","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AAO,CAAC,GAAG,WAAW;IAKxD,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,WAAW;IAKxD,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,WAAW;IAKxD,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,aAAa;IAK9D,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS;IAKlD,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS;CAI1D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}

View File

@@ -0,0 +1,183 @@
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _ScopeManager_options;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeManager = void 0;
const assert_1 = require("./assert");
const scope_1 = require("./scope");
const ClassFieldInitializerScope_1 = require("./scope/ClassFieldInitializerScope");
const ClassStaticBlockScope_1 = require("./scope/ClassStaticBlockScope");
/**
* @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface
*/
class ScopeManager {
get variables() {
const variables = new Set();
function recurse(scope) {
scope.variables.forEach(v => variables.add(v));
scope.childScopes.forEach(recurse);
}
this.scopes.forEach(recurse);
return Array.from(variables).sort((a, b) => a.$id - b.$id);
}
constructor(options) {
_ScopeManager_options.set(this, void 0);
this.scopes = [];
this.globalScope = null;
this.nodeToScope = new WeakMap();
this.currentScope = null;
__classPrivateFieldSet(this, _ScopeManager_options, options, "f");
this.declaredVariables = new WeakMap();
}
isGlobalReturn() {
return __classPrivateFieldGet(this, _ScopeManager_options, "f").globalReturn === true;
}
isModule() {
return __classPrivateFieldGet(this, _ScopeManager_options, "f").sourceType === 'module';
}
isImpliedStrict() {
return __classPrivateFieldGet(this, _ScopeManager_options, "f").impliedStrict === true;
}
isStrictModeSupported() {
return true;
}
isES6() {
return true;
}
/**
* Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node.
* If the node does not define any variable, this returns an empty array.
* @param node An AST node to get their variables.
*/
getDeclaredVariables(node) {
return this.declaredVariables.get(node) ?? [];
}
/**
* Get the scope of a given AST node. The gotten scope's `block` property is the node.
* This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`.
*
* @param node An AST node to get their scope.
* @param inner If the node has multiple scopes, this returns the outermost scope normally.
* If `inner` is `true` then this returns the innermost scope.
*/
acquire(node, inner = false) {
function predicate(testScope) {
if (testScope.type === scope_1.ScopeType.function &&
testScope.functionExpressionScope) {
return false;
}
return true;
}
const scopes = this.nodeToScope.get(node);
if (!scopes || scopes.length === 0) {
return null;
}
// Heuristic selection from all scopes.
// If you would like to get all scopes, please use ScopeManager#acquireAll.
if (scopes.length === 1) {
return scopes[0];
}
if (inner) {
for (let i = scopes.length - 1; i >= 0; --i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
return null;
}
return scopes.find(predicate) ?? null;
}
nestScope(scope) {
if (scope instanceof scope_1.GlobalScope) {
(0, assert_1.assert)(this.currentScope == null);
this.globalScope = scope;
}
this.currentScope = scope;
return scope;
}
nestBlockScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.BlockScope(this, this.currentScope, node));
}
nestCatchScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.CatchScope(this, this.currentScope, node));
}
nestClassScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ClassScope(this, this.currentScope, node));
}
nestClassFieldInitializerScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new ClassFieldInitializerScope_1.ClassFieldInitializerScope(this, this.currentScope, node));
}
nestClassStaticBlockScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new ClassStaticBlockScope_1.ClassStaticBlockScope(this, this.currentScope, node));
}
nestConditionalTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ConditionalTypeScope(this, this.currentScope, node));
}
nestForScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ForScope(this, this.currentScope, node));
}
nestFunctionExpressionNameScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionExpressionNameScope(this, this.currentScope, node));
}
nestFunctionScope(node, isMethodDefinition) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionScope(this, this.currentScope, node, isMethodDefinition));
}
nestFunctionTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionTypeScope(this, this.currentScope, node));
}
nestGlobalScope(node) {
return this.nestScope(new scope_1.GlobalScope(this, node));
}
nestMappedTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.MappedTypeScope(this, this.currentScope, node));
}
nestModuleScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ModuleScope(this, this.currentScope, node));
}
nestSwitchScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.SwitchScope(this, this.currentScope, node));
}
nestTSEnumScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TSEnumScope(this, this.currentScope, node));
}
nestTSModuleScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TSModuleScope(this, this.currentScope, node));
}
nestTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TypeScope(this, this.currentScope, node));
}
nestWithScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.WithScope(this, this.currentScope, node));
}
}
exports.ScopeManager = ScopeManager;
_ScopeManager_options = new WeakMap();
//# sourceMappingURL=ScopeManager.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,56 @@
import type { Lib, SourceType, TSESTree } from '@typescript-eslint/types';
import type { ReferencerOptions } from './referencer';
import { ScopeManager } from './ScopeManager';
interface AnalyzeOptions {
/**
* Known visitor keys.
*/
childVisitorKeys?: ReferencerOptions['childVisitorKeys'];
/**
* 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.
* 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 ['esnext'].
*
* https://www.typescriptlang.org/tsconfig#lib
*/
lib?: Lib[];
/**
* The source type of the script.
*/
sourceType?: SourceType;
/**
* 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

View File

@@ -0,0 +1 @@
{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM9C,UAAU,cAAc;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAEzD;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IAEZ;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAaD;;GAEG;AACH,iBAAS,OAAO,CACd,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,eAAe,CAAC,EAAE,cAAc,GAC/B,YAAY,CA6Bd;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC"}

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.analyze = void 0;
const visitor_keys_1 = require("@typescript-eslint/visitor-keys");
const referencer_1 = require("./referencer");
const ScopeManager_1 = require("./ScopeManager");
const DEFAULT_OPTIONS = {
childVisitorKeys: visitor_keys_1.visitorKeys,
globalReturn: false,
impliedStrict: false,
jsxPragma: 'React',
jsxFragmentName: null,
lib: ['es2018'],
sourceType: 'script',
emitDecoratorMetadata: false,
};
/**
* Takes an AST and returns the analyzed scopes.
*/
function analyze(tree, providedOptions) {
const options = {
childVisitorKeys: providedOptions?.childVisitorKeys ?? DEFAULT_OPTIONS.childVisitorKeys,
globalReturn: providedOptions?.globalReturn ?? DEFAULT_OPTIONS.globalReturn,
impliedStrict: providedOptions?.impliedStrict ?? DEFAULT_OPTIONS.impliedStrict,
jsxPragma: providedOptions?.jsxPragma === undefined
? DEFAULT_OPTIONS.jsxPragma
: providedOptions.jsxPragma,
jsxFragmentName: providedOptions?.jsxFragmentName ?? DEFAULT_OPTIONS.jsxFragmentName,
sourceType: providedOptions?.sourceType ?? DEFAULT_OPTIONS.sourceType,
lib: providedOptions?.lib ?? ['esnext'],
emitDecoratorMetadata: providedOptions?.emitDecoratorMetadata ??
DEFAULT_OPTIONS.emitDecoratorMetadata,
};
// ensure the option is lower cased
options.lib = options.lib.map(l => l.toLowerCase());
const scopeManager = new ScopeManager_1.ScopeManager(options);
const referencer = new referencer_1.Referencer(options, scopeManager);
referencer.visit(tree);
return scopeManager;
}
exports.analyze = analyze;
//# sourceMappingURL=analyze.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":";;;AACA,kEAA8D;AAG9D,6CAA0C;AAC1C,iDAA8C;AA6D9C,MAAM,eAAe,GAA6B;IAChD,gBAAgB,EAAE,0BAAW;IAC7B,YAAY,EAAE,KAAK;IACnB,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,OAAO;IAClB,eAAe,EAAE,IAAI;IACrB,GAAG,EAAE,CAAC,QAAQ,CAAC;IACf,UAAU,EAAE,QAAQ;IACpB,qBAAqB,EAAE,KAAK;CAC7B,CAAC;AAEF;;GAEG;AACH,SAAS,OAAO,CACd,IAAmB,EACnB,eAAgC;IAEhC,MAAM,OAAO,GAA6B;QACxC,gBAAgB,EACd,eAAe,EAAE,gBAAgB,IAAI,eAAe,CAAC,gBAAgB;QACvE,YAAY,EAAE,eAAe,EAAE,YAAY,IAAI,eAAe,CAAC,YAAY;QAC3E,aAAa,EACX,eAAe,EAAE,aAAa,IAAI,eAAe,CAAC,aAAa;QACjE,SAAS,EACP,eAAe,EAAE,SAAS,KAAK,SAAS;YACtC,CAAC,CAAC,eAAe,CAAC,SAAS;YAC3B,CAAC,CAAC,eAAe,CAAC,SAAS;QAC/B,eAAe,EACb,eAAe,EAAE,eAAe,IAAI,eAAe,CAAC,eAAe;QACrE,UAAU,EAAE,eAAe,EAAE,UAAU,IAAI,eAAe,CAAC,UAAU;QACrE,GAAG,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QACvC,qBAAqB,EACnB,eAAe,EAAE,qBAAqB;YACtC,eAAe,CAAC,qBAAqB;KACxC,CAAC;IAEF,mCAAmC;IACnC,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAS,CAAC,CAAC;IAE3D,MAAM,YAAY,GAAG,IAAI,2BAAY,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,IAAI,uBAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEzD,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEvB,OAAO,YAAY,CAAC;AACtB,CAAC;AAEQ,0BAAO"}

View File

@@ -0,0 +1,3 @@
declare function assert(value: unknown, message?: string): asserts value;
export { assert };
//# sourceMappingURL=assert.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AACA,iBAAS,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAI/D;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.assert = void 0;
// the base assert module doesn't use ts assertion syntax
function assert(value, message) {
if (value == null) {
throw new Error(message);
}
}
exports.assert = assert;
//# sourceMappingURL=assert.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,SAAS,MAAM,CAAC,KAAc,EAAE,OAAgB;IAC9C,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAEQ,wBAAM"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class CatchClauseDefinition extends DefinitionBase<DefinitionType.CatchClause, TSESTree.CatchClause, null, TSESTree.BindingName> {
constructor(name: TSESTree.BindingName, node: CatchClauseDefinition['node']);
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
}
export { CatchClauseDefinition };
//# sourceMappingURL=CatchClauseDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CatchClauseDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/CatchClauseDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,qBAAsB,SAAQ,cAAc,CAChD,cAAc,CAAC,WAAW,EAC1B,QAAQ,CAAC,WAAW,EACpB,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;gBACa,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC;IAI3E,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CatchClauseDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class CatchClauseDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.CatchClause, name, node, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
}
exports.CatchClauseDefinition = CatchClauseDefinition;
//# sourceMappingURL=CatchClauseDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"CatchClauseDefinition.js","sourceRoot":"","sources":["../../src/definition/CatchClauseDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,qBAAsB,SAAQ,+BAKnC;IACC,YAAY,IAA0B,EAAE,IAAmC;QACzE,KAAK,CAAC,+BAAc,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGtC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,sDAAqB"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class ClassNameDefinition extends DefinitionBase<DefinitionType.ClassName, TSESTree.ClassDeclaration | TSESTree.ClassExpression, null, TSESTree.Identifier> {
constructor(name: TSESTree.Identifier, node: ClassNameDefinition['node']);
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
}
export { ClassNameDefinition };
//# sourceMappingURL=ClassNameDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClassNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ClassNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,mBAAoB,SAAQ,cAAc,CAC9C,cAAc,CAAC,SAAS,EACxB,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,eAAe,EACpD,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC;IAIxE,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassNameDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class ClassNameDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.ClassName, name, node, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
}
exports.ClassNameDefinition = ClassNameDefinition;
//# sourceMappingURL=ClassNameDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClassNameDefinition.js","sourceRoot":"","sources":["../../src/definition/ClassNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,mBAAoB,SAAQ,+BAKjC;IACC,YAAY,IAAyB,EAAE,IAAiC;QACtE,KAAK,CAAC,+BAAc,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGpC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,kDAAmB"}

View File

@@ -0,0 +1,14 @@
import type { CatchClauseDefinition } from './CatchClauseDefinition';
import type { ClassNameDefinition } from './ClassNameDefinition';
import type { FunctionNameDefinition } from './FunctionNameDefinition';
import type { ImplicitGlobalVariableDefinition } from './ImplicitGlobalVariableDefinition';
import type { ImportBindingDefinition } from './ImportBindingDefinition';
import type { ParameterDefinition } from './ParameterDefinition';
import type { TSEnumMemberDefinition } from './TSEnumMemberDefinition';
import type { TSEnumNameDefinition } from './TSEnumNameDefinition';
import type { TSModuleNameDefinition } from './TSModuleNameDefinition';
import type { TypeDefinition } from './TypeDefinition';
import type { VariableDefinition } from './VariableDefinition';
type Definition = CatchClauseDefinition | ClassNameDefinition | FunctionNameDefinition | ImplicitGlobalVariableDefinition | ImportBindingDefinition | ParameterDefinition | TSEnumMemberDefinition | TSEnumNameDefinition | TSModuleNameDefinition | TypeDefinition | VariableDefinition;
export { Definition };
//# sourceMappingURL=Definition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Definition.d.ts","sourceRoot":"","sources":["../../src/definition/Definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,KAAK,UAAU,GACX,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,GACtB,gCAAgC,GAChC,uBAAuB,GACvB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,cAAc,GACd,kBAAkB,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,CAAC"}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Definition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Definition.js","sourceRoot":"","sources":["../../src/definition/Definition.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,39 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { DefinitionType } from './DefinitionType';
declare abstract class DefinitionBase<TType extends DefinitionType, TNode extends TSESTree.Node, TParent extends TSESTree.Node | null, TName extends TSESTree.Node> {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
readonly $id: number;
/**
* The type of the definition
* @public
*/
readonly type: TType;
/**
* The `Identifier` node of this definition
* @public
*/
readonly name: TName;
/**
* The enclosing node of the name.
* @public
*/
readonly node: TNode;
/**
* the enclosing statement node of the identifier.
* @public
*/
readonly parent: TParent;
constructor(type: TType, name: TName, node: TNode, parent: TParent);
/**
* `true` if the variable is valid in a type context, false otherwise
*/
abstract readonly isTypeDefinition: boolean;
/**
* `true` if the variable is valid in a value context, false otherwise
*/
abstract readonly isVariableDefinition: boolean;
}
export { DefinitionBase };
//# sourceMappingURL=DefinitionBase.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DefinitionBase.d.ts","sourceRoot":"","sources":["../../src/definition/DefinitionBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,uBAAe,cAAc,CAC3B,KAAK,SAAS,cAAc,EAC5B,KAAK,SAAS,QAAQ,CAAC,IAAI,EAC3B,OAAO,SAAS,QAAQ,CAAC,IAAI,GAAG,IAAI,EACpC,KAAK,SAAS,QAAQ,CAAC,IAAI;IAE3B;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAe;IAE1C;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAE5B;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAE5B;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAE5B;;;OAGG;IACH,SAAgB,MAAM,EAAE,OAAO,CAAC;gBAEpB,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO;IAOlE;;OAEG;IACH,kBAAyB,gBAAgB,EAAE,OAAO,CAAC;IAEnD;;OAEG;IACH,kBAAyB,oBAAoB,EAAE,OAAO,CAAC;CACxD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefinitionBase = void 0;
const ID_1 = require("../ID");
const generator = (0, ID_1.createIdGenerator)();
class DefinitionBase {
constructor(type, name, node, parent) {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
this.$id = generator();
this.type = type;
this.name = name;
this.node = node;
this.parent = parent;
}
}
exports.DefinitionBase = DefinitionBase;
//# sourceMappingURL=DefinitionBase.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DefinitionBase.js","sourceRoot":"","sources":["../../src/definition/DefinitionBase.ts"],"names":[],"mappings":";;;AAEA,8BAA0C;AAG1C,MAAM,SAAS,GAAG,IAAA,sBAAiB,GAAE,CAAC;AAEtC,MAAe,cAAc;IAmC3B,YAAY,IAAW,EAAE,IAAW,EAAE,IAAW,EAAE,MAAe;QA7BlE;;WAEG;QACa,QAAG,GAAW,SAAS,EAAE,CAAC;QA2BxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CAWF;AAEQ,wCAAc"}

View File

@@ -0,0 +1,15 @@
declare enum DefinitionType {
CatchClause = "CatchClause",
ClassName = "ClassName",
FunctionName = "FunctionName",
ImplicitGlobalVariable = "ImplicitGlobalVariable",
ImportBinding = "ImportBinding",
Parameter = "Parameter",
TSEnumName = "TSEnumName",
TSEnumMember = "TSEnumMemberName",
TSModuleName = "TSModuleName",
Type = "Type",
Variable = "Variable"
}
export { DefinitionType };
//# sourceMappingURL=DefinitionType.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DefinitionType.d.ts","sourceRoot":"","sources":["../../src/definition/DefinitionType.ts"],"names":[],"mappings":"AAAA,aAAK,cAAc;IACjB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,sBAAsB,2BAA2B;IACjD,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,YAAY,qBAAqB;IACjC,YAAY,iBAAiB;IAC7B,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefinitionType = void 0;
var DefinitionType;
(function (DefinitionType) {
DefinitionType["CatchClause"] = "CatchClause";
DefinitionType["ClassName"] = "ClassName";
DefinitionType["FunctionName"] = "FunctionName";
DefinitionType["ImplicitGlobalVariable"] = "ImplicitGlobalVariable";
DefinitionType["ImportBinding"] = "ImportBinding";
DefinitionType["Parameter"] = "Parameter";
DefinitionType["TSEnumName"] = "TSEnumName";
DefinitionType["TSEnumMember"] = "TSEnumMemberName";
DefinitionType["TSModuleName"] = "TSModuleName";
DefinitionType["Type"] = "Type";
DefinitionType["Variable"] = "Variable";
})(DefinitionType || (exports.DefinitionType = DefinitionType = {}));
//# sourceMappingURL=DefinitionType.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DefinitionType.js","sourceRoot":"","sources":["../../src/definition/DefinitionType.ts"],"names":[],"mappings":";;;AAAA,IAAK,cAYJ;AAZD,WAAK,cAAc;IACjB,6CAA2B,CAAA;IAC3B,yCAAuB,CAAA;IACvB,+CAA6B,CAAA;IAC7B,mEAAiD,CAAA;IACjD,iDAA+B,CAAA;IAC/B,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,mDAAiC,CAAA;IACjC,+CAA6B,CAAA;IAC7B,+BAAa,CAAA;IACb,uCAAqB,CAAA;AACvB,CAAC,EAZI,cAAc,8BAAd,cAAc,QAYlB"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class FunctionNameDefinition extends DefinitionBase<DefinitionType.FunctionName, TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression, null, TSESTree.Identifier> {
constructor(name: TSESTree.Identifier, node: FunctionNameDefinition['node']);
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
}
export { FunctionNameDefinition };
//# sourceMappingURL=FunctionNameDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FunctionNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/FunctionNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,sBAAuB,SAAQ,cAAc,CACjD,cAAc,CAAC,YAAY,EACzB,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,EACxC,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAI3E,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FunctionNameDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class FunctionNameDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.FunctionName, name, node, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
}
exports.FunctionNameDefinition = FunctionNameDefinition;
//# sourceMappingURL=FunctionNameDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FunctionNameDefinition.js","sourceRoot":"","sources":["../../src/definition/FunctionNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,sBAAuB,SAAQ,+BAQpC;IACC,YAAY,IAAyB,EAAE,IAAoC;QACzE,KAAK,CAAC,+BAAc,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGvC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,wDAAsB"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class ImplicitGlobalVariableDefinition extends DefinitionBase<DefinitionType.ImplicitGlobalVariable, TSESTree.Node, null, TSESTree.BindingName> {
constructor(name: TSESTree.BindingName, node: ImplicitGlobalVariableDefinition['node']);
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
}
export { ImplicitGlobalVariableDefinition };
//# sourceMappingURL=ImplicitGlobalVariableDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ImplicitGlobalVariableDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ImplicitGlobalVariableDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,gCAAiC,SAAQ,cAAc,CAC3D,cAAc,CAAC,sBAAsB,EACrC,QAAQ,CAAC,IAAI,EACb,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;gBAEG,IAAI,EAAE,QAAQ,CAAC,WAAW,EAC1B,IAAI,EAAE,gCAAgC,CAAC,MAAM,CAAC;IAKhD,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,gCAAgC,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImplicitGlobalVariableDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class ImplicitGlobalVariableDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.ImplicitGlobalVariable, name, node, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
}
exports.ImplicitGlobalVariableDefinition = ImplicitGlobalVariableDefinition;
//# sourceMappingURL=ImplicitGlobalVariableDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ImplicitGlobalVariableDefinition.js","sourceRoot":"","sources":["../../src/definition/ImplicitGlobalVariableDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,gCAAiC,SAAQ,+BAK9C;IACC,YACE,IAA0B,EAC1B,IAA8C;QAE9C,KAAK,CAAC,+BAAc,CAAC,sBAAsB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGjD,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,4EAAgC"}

View File

@@ -0,0 +1,11 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class ImportBindingDefinition extends DefinitionBase<DefinitionType.ImportBinding, TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier | TSESTree.ImportSpecifier | TSESTree.TSImportEqualsDeclaration, TSESTree.ImportDeclaration | TSESTree.TSImportEqualsDeclaration, TSESTree.Identifier> {
constructor(name: TSESTree.Identifier, node: TSESTree.TSImportEqualsDeclaration, decl: TSESTree.TSImportEqualsDeclaration);
constructor(name: TSESTree.Identifier, node: Exclude<ImportBindingDefinition['node'], TSESTree.TSImportEqualsDeclaration>, decl: TSESTree.ImportDeclaration);
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
}
export { ImportBindingDefinition };
//# sourceMappingURL=ImportBindingDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ImportBindingDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ImportBindingDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,uBAAwB,SAAQ,cAAc,CAClD,cAAc,CAAC,aAAa,EAC1B,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,wBAAwB,GACjC,QAAQ,CAAC,eAAe,GACxB,QAAQ,CAAC,yBAAyB,EACpC,QAAQ,CAAC,iBAAiB,GAAG,QAAQ,CAAC,yBAAyB,EAC/D,QAAQ,CAAC,UAAU,CACpB;gBAEG,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,QAAQ,CAAC,yBAAyB,EACxC,IAAI,EAAE,QAAQ,CAAC,yBAAyB;gBAGxC,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,OAAO,CACX,uBAAuB,CAAC,MAAM,CAAC,EAC/B,QAAQ,CAAC,yBAAyB,CACnC,EACD,IAAI,EAAE,QAAQ,CAAC,iBAAiB;IAUlC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImportBindingDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class ImportBindingDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node, decl) {
super(DefinitionType_1.DefinitionType.ImportBinding, name, node, decl);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
}
exports.ImportBindingDefinition = ImportBindingDefinition;
//# sourceMappingURL=ImportBindingDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ImportBindingDefinition.js","sourceRoot":"","sources":["../../src/definition/ImportBindingDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,uBAAwB,SAAQ,+BAQrC;IAcC,YACE,IAAyB,EACzB,IAAqC,EACrC,IAAqE;QAErE,KAAK,CAAC,+BAAc,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGxC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,0DAAuB"}

View File

@@ -0,0 +1,14 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class ParameterDefinition extends DefinitionBase<DefinitionType.Parameter, TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignature, null, TSESTree.BindingName> {
/**
* Whether the parameter definition is a part of a rest parameter.
*/
readonly rest: boolean;
constructor(name: TSESTree.BindingName, node: ParameterDefinition['node'], rest: boolean);
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
}
export { ParameterDefinition };
//# sourceMappingURL=ParameterDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ParameterDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ParameterDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,mBAAoB,SAAQ,cAAc,CAC9C,cAAc,CAAC,SAAS,EACtB,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,+BAA+B,GACxC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,GACtC,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,iBAAiB,EAC5B,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;IACC;;OAEG;IACH,SAAgB,IAAI,EAAE,OAAO,CAAC;gBAE5B,IAAI,EAAE,QAAQ,CAAC,WAAW,EAC1B,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,EACjC,IAAI,EAAE,OAAO;IAMf,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParameterDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class ParameterDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node, rest) {
super(DefinitionType_1.DefinitionType.Parameter, name, node, null);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
this.rest = rest;
}
}
exports.ParameterDefinition = ParameterDefinition;
//# sourceMappingURL=ParameterDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ParameterDefinition.js","sourceRoot":"","sources":["../../src/definition/ParameterDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,mBAAoB,SAAQ,+BAcjC;IAKC,YACE,IAA0B,EAC1B,IAAiC,EACjC,IAAa;QAEb,KAAK,CAAC,+BAAc,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAIpC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;QAJ1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAIF;AAEQ,kDAAmB"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class TSEnumMemberDefinition extends DefinitionBase<DefinitionType.TSEnumMember, TSESTree.TSEnumMember, null, TSESTree.Identifier | TSESTree.StringLiteral> {
constructor(name: TSESTree.Identifier | TSESTree.StringLiteral, node: TSEnumMemberDefinition['node']);
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
}
export { TSEnumMemberDefinition };
//# sourceMappingURL=TSEnumMemberDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TSEnumMemberDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSEnumMemberDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,sBAAuB,SAAQ,cAAc,CACjD,cAAc,CAAC,YAAY,EAC3B,QAAQ,CAAC,YAAY,EACrB,IAAI,EACJ,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAC7C;gBAEG,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,EAClD,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAKtC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSEnumMemberDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class TSEnumMemberDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.TSEnumMember, name, node, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
}
exports.TSEnumMemberDefinition = TSEnumMemberDefinition;
//# sourceMappingURL=TSEnumMemberDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TSEnumMemberDefinition.js","sourceRoot":"","sources":["../../src/definition/TSEnumMemberDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,sBAAuB,SAAQ,+BAKpC;IACC,YACE,IAAkD,EAClD,IAAoC;QAEpC,KAAK,CAAC,+BAAc,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGvC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,wDAAsB"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class TSEnumNameDefinition extends DefinitionBase<DefinitionType.TSEnumName, TSESTree.TSEnumDeclaration, null, TSESTree.Identifier> {
constructor(name: TSESTree.Identifier, node: TSEnumNameDefinition['node']);
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
}
export { TSEnumNameDefinition };
//# sourceMappingURL=TSEnumNameDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TSEnumNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSEnumNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,oBAAqB,SAAQ,cAAc,CAC/C,cAAc,CAAC,UAAU,EACzB,QAAQ,CAAC,iBAAiB,EAC1B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC;IAIzE,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSEnumNameDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class TSEnumNameDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.TSEnumName, name, node, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
}
exports.TSEnumNameDefinition = TSEnumNameDefinition;
//# sourceMappingURL=TSEnumNameDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TSEnumNameDefinition.js","sourceRoot":"","sources":["../../src/definition/TSEnumNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,oBAAqB,SAAQ,+BAKlC;IACC,YAAY,IAAyB,EAAE,IAAkC;QACvE,KAAK,CAAC,+BAAc,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGrC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,oDAAoB"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class TSModuleNameDefinition extends DefinitionBase<DefinitionType.TSModuleName, TSESTree.TSModuleDeclaration, null, TSESTree.Identifier> {
constructor(name: TSESTree.Identifier, node: TSModuleNameDefinition['node']);
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
}
export { TSModuleNameDefinition };
//# sourceMappingURL=TSModuleNameDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TSModuleNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSModuleNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,sBAAuB,SAAQ,cAAc,CACjD,cAAc,CAAC,YAAY,EAC3B,QAAQ,CAAC,mBAAmB,EAC5B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAI3E,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSModuleNameDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class TSModuleNameDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.TSModuleName, name, node, null);
this.isTypeDefinition = true;
this.isVariableDefinition = true;
}
}
exports.TSModuleNameDefinition = TSModuleNameDefinition;
//# sourceMappingURL=TSModuleNameDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TSModuleNameDefinition.js","sourceRoot":"","sources":["../../src/definition/TSModuleNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,sBAAuB,SAAQ,+BAKpC;IACC,YAAY,IAAyB,EAAE,IAAoC;QACzE,KAAK,CAAC,+BAAc,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGvC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,wDAAsB"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class TypeDefinition extends DefinitionBase<DefinitionType.Type, TSESTree.TSInterfaceDeclaration | TSESTree.TSTypeAliasDeclaration | TSESTree.TSTypeParameter, null, TSESTree.Identifier> {
constructor(name: TSESTree.Identifier, node: TypeDefinition['node']);
readonly isTypeDefinition = true;
readonly isVariableDefinition = false;
}
export { TypeDefinition };
//# sourceMappingURL=TypeDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TypeDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TypeDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,cAAe,SAAQ,cAAc,CACzC,cAAc,CAAC,IAAI,EACjB,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,eAAe,EAC1B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;IAInE,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,SAAS;CAC9C;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class TypeDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node) {
super(DefinitionType_1.DefinitionType.Type, name, node, null);
this.isTypeDefinition = true;
this.isVariableDefinition = false;
}
}
exports.TypeDefinition = TypeDefinition;
//# sourceMappingURL=TypeDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TypeDefinition.js","sourceRoot":"","sources":["../../src/definition/TypeDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,cAAe,SAAQ,+BAO5B;IACC,YAAY,IAAyB,EAAE,IAA4B;QACjE,KAAK,CAAC,+BAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAG/B,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,KAAK,CAAC;IAH7C,CAAC;CAIF;AAEQ,wCAAc"}

View File

@@ -0,0 +1,10 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
declare class VariableDefinition extends DefinitionBase<DefinitionType.Variable, TSESTree.VariableDeclarator, TSESTree.VariableDeclaration, TSESTree.Identifier> {
constructor(name: TSESTree.Identifier, node: VariableDefinition['node'], decl: TSESTree.VariableDeclaration);
readonly isTypeDefinition = false;
readonly isVariableDefinition = true;
}
export { VariableDefinition };
//# sourceMappingURL=VariableDefinition.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"VariableDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/VariableDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,kBAAmB,SAAQ,cAAc,CAC7C,cAAc,CAAC,QAAQ,EACvB,QAAQ,CAAC,kBAAkB,EAC3B,QAAQ,CAAC,mBAAmB,EAC5B,QAAQ,CAAC,UAAU,CACpB;gBAEG,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAChC,IAAI,EAAE,QAAQ,CAAC,mBAAmB;IAKpC,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VariableDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class VariableDefinition extends DefinitionBase_1.DefinitionBase {
constructor(name, node, decl) {
super(DefinitionType_1.DefinitionType.Variable, name, node, decl);
this.isTypeDefinition = false;
this.isVariableDefinition = true;
}
}
exports.VariableDefinition = VariableDefinition;
//# sourceMappingURL=VariableDefinition.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"VariableDefinition.js","sourceRoot":"","sources":["../../src/definition/VariableDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,kBAAmB,SAAQ,+BAKhC;IACC,YACE,IAAyB,EACzB,IAAgC,EAChC,IAAkC;QAElC,KAAK,CAAC,+BAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGnC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,gDAAkB"}

View File

@@ -0,0 +1,14 @@
export * from './CatchClauseDefinition';
export * from './ClassNameDefinition';
export * from './Definition';
export * from './DefinitionType';
export * from './FunctionNameDefinition';
export * from './ImplicitGlobalVariableDefinition';
export * from './ImportBindingDefinition';
export * from './ParameterDefinition';
export * from './TSEnumMemberDefinition';
export * from './TSEnumNameDefinition';
export * from './TSModuleNameDefinition';
export * from './TypeDefinition';
export * from './VariableDefinition';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}

View File

@@ -0,0 +1,30 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./CatchClauseDefinition"), exports);
__exportStar(require("./ClassNameDefinition"), exports);
__exportStar(require("./Definition"), exports);
__exportStar(require("./DefinitionType"), exports);
__exportStar(require("./FunctionNameDefinition"), exports);
__exportStar(require("./ImplicitGlobalVariableDefinition"), exports);
__exportStar(require("./ImportBindingDefinition"), exports);
__exportStar(require("./ParameterDefinition"), exports);
__exportStar(require("./TSEnumMemberDefinition"), exports);
__exportStar(require("./TSEnumNameDefinition"), exports);
__exportStar(require("./TSModuleNameDefinition"), exports);
__exportStar(require("./TypeDefinition"), exports);
__exportStar(require("./VariableDefinition"), exports);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,wDAAsC;AACtC,+CAA6B;AAC7B,mDAAiC;AACjC,2DAAyC;AACzC,qEAAmD;AACnD,4DAA0C;AAC1C,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,2DAAyC;AACzC,mDAAiC;AACjC,uDAAqC"}

View File

@@ -0,0 +1,9 @@
export { analyze, AnalyzeOptions } from './analyze';
export * from './definition';
export { Reference } from './referencer/Reference';
export { Visitor } from './referencer/Visitor';
export { PatternVisitor, PatternVisitorCallback, PatternVisitorOptions, } from './referencer/PatternVisitor';
export * from './scope';
export { ScopeManager } from './ScopeManager';
export * from './variable';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,cAAc,YAAY,CAAC"}

View File

@@ -0,0 +1,31 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeManager = exports.PatternVisitor = exports.Visitor = exports.Reference = exports.analyze = void 0;
var analyze_1 = require("./analyze");
Object.defineProperty(exports, "analyze", { enumerable: true, get: function () { return analyze_1.analyze; } });
__exportStar(require("./definition"), exports);
var Reference_1 = require("./referencer/Reference");
Object.defineProperty(exports, "Reference", { enumerable: true, get: function () { return Reference_1.Reference; } });
var Visitor_1 = require("./referencer/Visitor");
Object.defineProperty(exports, "Visitor", { enumerable: true, get: function () { return Visitor_1.Visitor; } });
var PatternVisitor_1 = require("./referencer/PatternVisitor");
Object.defineProperty(exports, "PatternVisitor", { enumerable: true, get: function () { return PatternVisitor_1.PatternVisitor; } });
__exportStar(require("./scope"), exports);
var ScopeManager_1 = require("./ScopeManager");
Object.defineProperty(exports, "ScopeManager", { enumerable: true, get: function () { return ScopeManager_1.ScopeManager; } });
__exportStar(require("./variable"), exports);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAAoD;AAA3C,kGAAA,OAAO,OAAA;AAChB,+CAA6B;AAC7B,oDAAmD;AAA1C,sGAAA,SAAS,OAAA;AAClB,gDAA+C;AAAtC,kGAAA,OAAO,OAAA;AAChB,8DAIqC;AAHnC,gHAAA,cAAc,OAAA;AAIhB,0CAAwB;AACxB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,6CAA2B"}

View File

@@ -0,0 +1,16 @@
export declare const TYPE: Readonly<{
eslintImplicitGlobalSetting: "readonly";
isTypeVariable: true;
isValueVariable: false;
}>;
export declare const VALUE: Readonly<{
eslintImplicitGlobalSetting: "readonly";
isTypeVariable: false;
isValueVariable: true;
}>;
export declare const TYPE_VALUE: Readonly<{
eslintImplicitGlobalSetting: "readonly";
isTypeVariable: true;
isValueVariable: true;
}>;
//# sourceMappingURL=base-config.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"base-config.d.ts","sourceRoot":"","sources":["../../src/lib/base-config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;EAIf,CAAC;AACH,eAAO,MAAM,KAAK;;;;EAIhB,CAAC;AACH,eAAO,MAAM,UAAU;;;;EAIrB,CAAC"}

View File

@@ -0,0 +1,23 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib @typescript-eslint/repo-tools
Object.defineProperty(exports, "__esModule", { value: true });
exports.TYPE_VALUE = exports.VALUE = exports.TYPE = void 0;
exports.TYPE = Object.freeze({
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
});
exports.VALUE = Object.freeze({
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: false,
isValueVariable: true,
});
exports.TYPE_VALUE = Object.freeze({
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: true,
});
//# sourceMappingURL=base-config.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"base-config.js","sourceRoot":"","sources":["../../src/lib/base-config.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,oDAAoD;;;AAEvC,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;IAChC,2BAA2B,EAAE,UAAU;IACvC,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,KAAK;CACvB,CAAC,CAAC;AACU,QAAA,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,2BAA2B,EAAE,UAAU;IACvC,cAAc,EAAE,KAAK;IACrB,eAAe,EAAE,IAAI;CACtB,CAAC,CAAC;AACU,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,2BAA2B,EAAE,UAAU;IACvC,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,IAAI;CACtB,CAAC,CAAC"}

View File

@@ -0,0 +1,3 @@
import type { ImplicitLibVariableOptions } from '../variable';
export declare const decorators: Record<string, ImplicitLibVariableOptions>;
//# sourceMappingURL=decorators.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/lib/decorators.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,UAAU,4CAawB,CAAC"}

View File

@@ -0,0 +1,23 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib @typescript-eslint/repo-tools
Object.defineProperty(exports, "__esModule", { value: true });
exports.decorators = void 0;
const base_config_1 = require("./base-config");
exports.decorators = {
ClassMemberDecoratorContext: base_config_1.TYPE,
DecoratorContext: base_config_1.TYPE,
DecoratorMetadataObject: base_config_1.TYPE,
DecoratorMetadata: base_config_1.TYPE,
ClassDecoratorContext: base_config_1.TYPE,
ClassMethodDecoratorContext: base_config_1.TYPE,
ClassGetterDecoratorContext: base_config_1.TYPE,
ClassSetterDecoratorContext: base_config_1.TYPE,
ClassAccessorDecoratorContext: base_config_1.TYPE,
ClassAccessorDecoratorTarget: base_config_1.TYPE,
ClassAccessorDecoratorResult: base_config_1.TYPE,
ClassFieldDecoratorContext: base_config_1.TYPE,
};
//# sourceMappingURL=decorators.js.map

Some files were not shown because too many files have changed in this diff Show More