source: trip-planner-front/node_modules/@types/eslint-scope/README.md@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.7 KB
Line 
1# Installation
2> `npm install --save @types/eslint-scope`
3
4# Summary
5This package contains type definitions for eslint-scope (http://github.com/eslint/eslint-scope).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-scope/index.d.ts)
10````ts
11// Type definitions for eslint-scope 3.7
12// Project: http://github.com/eslint/eslint-scope
13// Definitions by: Toru Nagashima <https://github.com/mysticatea>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15// TypeScript Version: 2.2
16import * as eslint from "eslint";
17import * as estree from "estree";
18
19export const version: string;
20
21export class ScopeManager implements eslint.Scope.ScopeManager {
22 scopes: Scope[];
23 globalScope: Scope;
24 acquire(node: {}, inner?: boolean): Scope | null;
25 getDeclaredVariables(node: {}): Variable[];
26}
27
28export class Scope implements eslint.Scope.Scope {
29 type: "block" | "catch" | "class" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with" | "TDZ";
30 isStrict: boolean;
31 upper: Scope | null;
32 childScopes: Scope[];
33 variableScope: Scope;
34 block: estree.Node;
35 variables: Variable[];
36 set: Map<string, Variable>;
37 references: Reference[];
38 through: Reference[];
39 functionExpressionScope: boolean;
40}
41
42export class Variable implements eslint.Scope.Variable {
43 name: string;
44 identifiers: estree.Identifier[];
45 references: Reference[];
46 defs: eslint.Scope.Definition[];
47}
48
49export class Reference implements eslint.Scope.Reference {
50 identifier: estree.Identifier;
51 from: Scope;
52 resolved: Variable | null;
53 writeExpr: estree.Node | null;
54 init: boolean;
55
56 isWrite(): boolean;
57 isRead(): boolean;
58 isWriteOnly(): boolean;
59 isReadOnly(): boolean;
60 isReadWrite(): boolean;
61}
62
63export interface AnalysisOptions {
64 optimistic?: boolean | undefined;
65 directive?: boolean | undefined;
66 ignoreEval?: boolean | undefined;
67 nodejsScope?: boolean | undefined;
68 impliedStrict?: boolean | undefined;
69 fallback?: string | ((node: {}) => string[]) | undefined;
70 sourceType?: "script" | "module" | undefined;
71 ecmaVersion?: number | undefined;
72}
73
74export function analyze(ast: {}, options?: AnalysisOptions): ScopeManager;
75
76````
77
78### Additional Details
79 * Last updated: Tue, 06 Jul 2021 19:03:40 GMT
80 * Dependencies: [@types/eslint](https://npmjs.com/package/@types/eslint), [@types/estree](https://npmjs.com/package/@types/estree)
81 * Global values: none
82
83# Credits
84These definitions were written by [Toru Nagashima](https://github.com/mysticatea).
Note: See TracBrowser for help on using the repository browser.