luaut-parser 2.1.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -15
- package/dist/index.cjs +2105 -358
- package/dist/index.d.cts +162 -18
- package/dist/index.d.ts +162 -18
- package/dist/index.js +2100 -358
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -54,6 +54,10 @@ interface InterpolatedStringPart_String {
|
|
|
54
54
|
interface InterpolatedStringPart_Expression {
|
|
55
55
|
kind: "expression";
|
|
56
56
|
raw: string;
|
|
57
|
+
/** Where `raw` starts in the file, so what is parsed from it can be
|
|
58
|
+
* placed there rather than at the top of an imaginary one. */
|
|
59
|
+
line: number;
|
|
60
|
+
column: number;
|
|
57
61
|
}
|
|
58
62
|
interface InterpolatedStringToken extends BaseToken {
|
|
59
63
|
type: "InterpolatedString";
|
|
@@ -68,7 +72,72 @@ declare class LexError extends Error {
|
|
|
68
72
|
column: number;
|
|
69
73
|
constructor(message: string, line: number, column: number);
|
|
70
74
|
}
|
|
71
|
-
|
|
75
|
+
/** A `--` comment: its text after the dashes (a long comment's content), and
|
|
76
|
+
* where it starts and ends. */
|
|
77
|
+
interface SourceComment {
|
|
78
|
+
text: string;
|
|
79
|
+
line: number;
|
|
80
|
+
column: number;
|
|
81
|
+
endLine: number;
|
|
82
|
+
}
|
|
83
|
+
interface TokenizeOptions {
|
|
84
|
+
/** When given, a malformed token is recorded here instead of thrown, and
|
|
85
|
+
* lexing goes on: an unclosed string or comment ends at the end of its
|
|
86
|
+
* line (a long bracket at the end of the source), and a character that
|
|
87
|
+
* starts no token is skipped. An editor mid-keystroke still gets every
|
|
88
|
+
* other token. */
|
|
89
|
+
errors?: LexError[];
|
|
90
|
+
/** When given, every comment is collected here, in order. */
|
|
91
|
+
comments?: SourceComment[];
|
|
92
|
+
}
|
|
93
|
+
declare function tokenize(source: string, options?: TokenizeOptions): Token[];
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Comments that switch checking off, as TypeScript's `// @ts-...` comments do:
|
|
97
|
+
*
|
|
98
|
+
* --@luaut-nocheck no scope or type errors anywhere in this file
|
|
99
|
+
* --@luaut-ignore none on the next line of code
|
|
100
|
+
* --@luaut-expect-error none on the next line of code, and an error if
|
|
101
|
+
* that line has none to suppress
|
|
102
|
+
*
|
|
103
|
+
* A space after `--` is fine, and so is text after the directive (a reason).
|
|
104
|
+
* `nocheck` counts only in the comments before the first line of code, as in
|
|
105
|
+
* TypeScript. Syntax errors are never suppressed: code that does not parse
|
|
106
|
+
* cannot be compiled either way.
|
|
107
|
+
*/
|
|
108
|
+
type DirectiveKind = "nocheck" | "ignore" | "expect-error";
|
|
109
|
+
interface Directive {
|
|
110
|
+
kind: DirectiveKind;
|
|
111
|
+
/** Where the comment starts. */
|
|
112
|
+
line: number;
|
|
113
|
+
column: number;
|
|
114
|
+
/** `ignore` / `expect-error`: the line whose diagnostics it covers — the
|
|
115
|
+
* next line with code on it. */
|
|
116
|
+
target?: number;
|
|
117
|
+
}
|
|
118
|
+
interface Directives {
|
|
119
|
+
/** The file has `--@luaut-nocheck` before its first line of code. */
|
|
120
|
+
nocheck: boolean;
|
|
121
|
+
/** Every directive, in order — a `nocheck` after the code starts included,
|
|
122
|
+
* so a tool can point out that it does nothing. */
|
|
123
|
+
all: Directive[];
|
|
124
|
+
}
|
|
125
|
+
/** The directives in `comments`, placed against `tokens` (both from one
|
|
126
|
+
* `tokenize` of the file). */
|
|
127
|
+
declare function readDirectives(comments: readonly SourceComment[], tokens: readonly Token[]): Directives;
|
|
128
|
+
/** The directives of `source`, for a caller that parsed it some other way. */
|
|
129
|
+
declare function directivesOf(source: string): Directives;
|
|
130
|
+
interface DirectiveOutcome<T> {
|
|
131
|
+
/** The diagnostics no directive suppresses. */
|
|
132
|
+
kept: T[];
|
|
133
|
+
/** `--@luaut-expect-error` comments with nothing to suppress. Each is an
|
|
134
|
+
* error to report: "Unused '@luaut-expect-error' directive". */
|
|
135
|
+
unusedExpectErrors: Directive[];
|
|
136
|
+
}
|
|
137
|
+
/** Filter scope and type diagnostics — never syntax errors — through the
|
|
138
|
+
* file's directives. `lineOf` gives the line a diagnostic starts on. */
|
|
139
|
+
declare function applyDirectives<T>(directives: Directives, diagnostics: readonly T[], lineOf: (diagnostic: T) => number): DirectiveOutcome<T>;
|
|
140
|
+
declare const UNUSED_EXPECT_ERROR = "Unused '@luaut-expect-error' directive";
|
|
72
141
|
|
|
73
142
|
interface BaseNode {
|
|
74
143
|
line: {
|
|
@@ -99,11 +168,17 @@ interface ImportStatement extends BaseNode {
|
|
|
99
168
|
type: "ImportStatement";
|
|
100
169
|
/** `import Default from '...'` */
|
|
101
170
|
defaultImport?: Identifier;
|
|
171
|
+
/** `import * as Module from '...'` — the module's exports as one value. */
|
|
172
|
+
namespaceImport?: Identifier;
|
|
173
|
+
/** `import type { A } from '...'`: every name it brings in is a type and
|
|
174
|
+
* may only be used as one — never as a value. It exists for the type
|
|
175
|
+
* checker alone, and leaves nothing in compiled code. */
|
|
176
|
+
isTypeOnly?: boolean;
|
|
102
177
|
/** `import { a, b as c } from '...'` */
|
|
103
178
|
specifiers: ImportSpecifier[];
|
|
104
179
|
source: StringLiteral;
|
|
105
180
|
}
|
|
106
|
-
/** `export const x = 1`, `export let y = 2`, `export
|
|
181
|
+
/** `export const x = 1`, `export let y = 2`, `export function f() end` */
|
|
107
182
|
interface ExportStatement extends BaseNode {
|
|
108
183
|
type: "ExportStatement";
|
|
109
184
|
declaration: VariableDeclaration | FunctionDeclaration;
|
|
@@ -214,17 +289,22 @@ interface ArrayPatternElement extends BaseNode {
|
|
|
214
289
|
value: BindingTarget;
|
|
215
290
|
default?: Expression;
|
|
216
291
|
}
|
|
217
|
-
/** `
|
|
218
|
-
*
|
|
292
|
+
/** `function f() ... end` — declares `f` in the enclosing scope, visible to
|
|
293
|
+
* its own body (so it can recurse). Like TypeScript's function declaration,
|
|
294
|
+
* the name cannot be reassigned. `function a.b() end` and `function T:m() end`
|
|
295
|
+
* assign to a member instead: see `FunctionDeclarationStatement`. */
|
|
219
296
|
interface FunctionDeclaration extends BaseNode {
|
|
220
297
|
type: "FunctionDeclaration";
|
|
221
|
-
|
|
298
|
+
/** The name on the line the body is written on, when the declaration is
|
|
299
|
+
* an overload set — `name` is the first signature's. */
|
|
300
|
+
implementationName?: Identifier;
|
|
222
301
|
name: Identifier;
|
|
223
302
|
func: FunctionBody;
|
|
224
303
|
attributes?: string[];
|
|
225
304
|
/** TS-style overload signatures preceding the implementation (`func`). */
|
|
226
305
|
signatures?: FunctionSignature[];
|
|
227
306
|
}
|
|
307
|
+
/** `function a.b() end` / `function T:m() end` — defines a member. */
|
|
228
308
|
interface FunctionDeclarationStatement extends BaseNode {
|
|
229
309
|
type: "FunctionDeclarationStatement";
|
|
230
310
|
target: FunctionName;
|
|
@@ -239,6 +319,9 @@ interface FunctionDeclarationStatement extends BaseNode {
|
|
|
239
319
|
* followed by the implementation `function f(...) ... end`. */
|
|
240
320
|
interface FunctionSignature extends BaseNode {
|
|
241
321
|
type: "FunctionSignature";
|
|
322
|
+
/** The name this signature was written with — one line of an overload
|
|
323
|
+
* set, each of which a tool can point at on its own. */
|
|
324
|
+
name?: Identifier;
|
|
242
325
|
generics: GenericTypeParameter[];
|
|
243
326
|
params: FunctionParameter[];
|
|
244
327
|
hasVarargs: boolean;
|
|
@@ -339,7 +422,14 @@ interface GenericTypeParameter extends BaseNode {
|
|
|
339
422
|
constraint?: TypeNode;
|
|
340
423
|
default?: TypeNode | TypePackNode;
|
|
341
424
|
}
|
|
342
|
-
type Expression = Identifier | NilLiteral | BooleanLiteral | NumberLiteral | StringLiteral | InterpolatedStringExpression | VarargExpression | FunctionExpression | TableExpression | ArrayExpression | BinaryExpression | UnaryExpression | MemberExpression | IndexExpression | CallExpression | MethodCallExpression | ParenthesizedExpression | TypeAssertionExpression | SatisfiesExpression | AsConstExpression | IfElseExpression;
|
|
425
|
+
type Expression = Identifier | NilLiteral | BooleanLiteral | NumberLiteral | StringLiteral | InterpolatedStringExpression | VarargExpression | FunctionExpression | TableExpression | ArrayExpression | BinaryExpression | UnaryExpression | MemberExpression | IndexExpression | CallExpression | MethodCallExpression | ParenthesizedExpression | TypeAssertionExpression | SatisfiesExpression | AsConstExpression | IfElseExpression | ErrorExpression;
|
|
426
|
+
/** An expression that could not be parsed. Only produced in recovery mode
|
|
427
|
+
* (`parseWithRecovery`), where a broken initializer, condition, field value or
|
|
428
|
+
* argument keeps its place in the tree; its span covers the skipped tokens
|
|
429
|
+
* (and is empty when nothing was written). Its type is `any`. */
|
|
430
|
+
interface ErrorExpression extends BaseNode {
|
|
431
|
+
type: "ErrorExpression";
|
|
432
|
+
}
|
|
343
433
|
interface Identifier extends BaseNode {
|
|
344
434
|
type: "Identifier";
|
|
345
435
|
name: string;
|
|
@@ -466,6 +556,9 @@ interface MemberExpression extends BaseNode {
|
|
|
466
556
|
type: "MemberExpression";
|
|
467
557
|
object: Expression;
|
|
468
558
|
property: Identifier;
|
|
559
|
+
/** `object?.property` — when `object` is nil, the whole chain this link
|
|
560
|
+
* belongs to is nil and nothing after it is evaluated. */
|
|
561
|
+
optional?: boolean;
|
|
469
562
|
}
|
|
470
563
|
interface IndexExpression extends BaseNode {
|
|
471
564
|
type: "IndexExpression";
|
|
@@ -476,12 +569,22 @@ interface CallExpression extends BaseNode {
|
|
|
476
569
|
type: "CallExpression";
|
|
477
570
|
callee: Expression;
|
|
478
571
|
arguments: Expression[];
|
|
572
|
+
/** `f<T>(x)` — type arguments written out rather than inferred. */
|
|
573
|
+
typeArguments?: (TypeNode | TypePackNode)[];
|
|
574
|
+
/** `f?.(...)` — see `MemberExpression.optional`. The call does not happen,
|
|
575
|
+
* and the arguments are not evaluated, when `callee` is nil. */
|
|
576
|
+
optional?: boolean;
|
|
479
577
|
}
|
|
480
578
|
interface MethodCallExpression extends BaseNode {
|
|
481
579
|
type: "MethodCallExpression";
|
|
482
580
|
object: Expression;
|
|
483
581
|
method: Identifier;
|
|
484
582
|
arguments: Expression[];
|
|
583
|
+
/** `obj:m<T>(x)` — see `CallExpression.typeArguments`. */
|
|
584
|
+
typeArguments?: (TypeNode | TypePackNode)[];
|
|
585
|
+
/** `object?:method(...)` — see `MemberExpression.optional`. The
|
|
586
|
+
* arguments are not evaluated when `object` is nil. */
|
|
587
|
+
optional?: boolean;
|
|
485
588
|
}
|
|
486
589
|
interface ParenthesizedExpression extends BaseNode {
|
|
487
590
|
type: "ParenthesizedExpression";
|
|
@@ -716,6 +819,11 @@ interface ParserOptions {
|
|
|
716
819
|
* first one. The returned AST has an `ErrorStatement` wherever a statement
|
|
717
820
|
* could not be parsed. */
|
|
718
821
|
recover?: boolean;
|
|
822
|
+
/** Recovery only: read where a block ends from indentation when an `end`
|
|
823
|
+
* is missing — a line indented no deeper than the line that opened the
|
|
824
|
+
* block is past it. Valid code never needs this; `parseWithRecovery`
|
|
825
|
+
* reparses with it when the first pass found an `end` missing. */
|
|
826
|
+
indentation?: boolean;
|
|
719
827
|
}
|
|
720
828
|
declare function parse(source: string): Program;
|
|
721
829
|
declare function parseTokens(tokens: Token[]): Program;
|
|
@@ -723,13 +831,16 @@ declare function parseExpressionFromSource(raw: string): Expression;
|
|
|
723
831
|
interface RecoverResult {
|
|
724
832
|
program: Program;
|
|
725
833
|
errors: ParseError[];
|
|
834
|
+
/** The file's `--@luaut-...` comments; see `applyDirectives`. */
|
|
835
|
+
directives: Directives;
|
|
726
836
|
}
|
|
727
837
|
/**
|
|
728
|
-
* Like `parse`, but never throws on a syntax error: it records every error
|
|
729
|
-
*
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
*
|
|
838
|
+
* Like `parse`, but never throws on a syntax error: it records every error and
|
|
839
|
+
* returns a best-effort AST. A broken expression becomes an `ErrorExpression`,
|
|
840
|
+
* a broken field or argument is skipped to the next `,`, a missing `)`, `}`,
|
|
841
|
+
* `then`, `do` or `end` is recorded and read past, and only what none of those
|
|
842
|
+
* cover becomes an `ErrorStatement`. A malformed token (an unclosed string) is
|
|
843
|
+
* an error too, and the rest of the file still lexes.
|
|
733
844
|
*
|
|
734
845
|
* This is the entry point a language server should use for open documents.
|
|
735
846
|
*/
|
|
@@ -758,8 +869,12 @@ interface Binding {
|
|
|
758
869
|
* bindings are never given a `declarationNode` from assignment
|
|
759
870
|
* inference, since they're not really "defined" in this file. */
|
|
760
871
|
isBuiltin?: boolean;
|
|
761
|
-
/** True for a
|
|
872
|
+
/** True for a binding that cannot be reassigned: a `const`, an import, or
|
|
873
|
+
* a function declaration. */
|
|
762
874
|
isConst?: boolean;
|
|
875
|
+
/** Set when the binding comes from something other than `const` / `let`,
|
|
876
|
+
* which is also what an error about reassigning it names. */
|
|
877
|
+
declaredBy?: "import" | "namespace" | "function" | "type";
|
|
763
878
|
}
|
|
764
879
|
interface ScopeDiagnostic {
|
|
765
880
|
/** the offending node (redeclaration site, or assignment target) */
|
|
@@ -774,7 +889,7 @@ interface ScopeDiagnostic {
|
|
|
774
889
|
};
|
|
775
890
|
};
|
|
776
891
|
message: string;
|
|
777
|
-
kind: "redeclare" | "const-assign";
|
|
892
|
+
kind: "redeclare" | "const-assign" | "type-only" | "undeclared" | "use-before-define";
|
|
778
893
|
}
|
|
779
894
|
interface ScopeAnalysis {
|
|
780
895
|
/** Every Identifier that appears in a variable *usage* position (i.e.
|
|
@@ -800,6 +915,12 @@ interface AnalyzeScopesOptions {
|
|
|
800
915
|
* one of these does not count as "defining" it, so `declarationNode`
|
|
801
916
|
* is left unset even though the binding exists up front. */
|
|
802
917
|
builtinGlobals?: readonly string[];
|
|
918
|
+
/** Report each read of a name nothing declares — not a local, not one of
|
|
919
|
+
* `builtinGlobals`, not `declare`d in the file, never assigned as a
|
|
920
|
+
* global: "Cannot find name 'x'", as TypeScript says. Only meaningful
|
|
921
|
+
* when `builtinGlobals` lists everything the file's type libraries
|
|
922
|
+
* declare, so it is off unless asked for. */
|
|
923
|
+
reportUndeclared?: boolean;
|
|
803
924
|
}
|
|
804
925
|
declare function getBinding(analysis: ScopeAnalysis, id: Identifier | IdentifierPattern): Binding | undefined;
|
|
805
926
|
declare function isGlobal(binding: Binding): boolean;
|
|
@@ -915,6 +1036,9 @@ interface FunctionType {
|
|
|
915
1036
|
/** Names of the function's own generic parameters (`function f<T>(...)`).
|
|
916
1037
|
* `params` / `returns` may contain `typeParam` nodes for these. */
|
|
917
1038
|
typeParams?: string[];
|
|
1039
|
+
/** `<T = Instance>` — what a call uses for a parameter it is not given and
|
|
1040
|
+
* cannot infer. */
|
|
1041
|
+
typeParamDefaults?: Record<string, Type>;
|
|
918
1042
|
/** Set when the function was declared with an `x is T` / `asserts x` return. */
|
|
919
1043
|
predicate?: TypePredicate;
|
|
920
1044
|
}
|
|
@@ -1097,8 +1221,9 @@ declare function formatType(t: Type): string;
|
|
|
1097
1221
|
|
|
1098
1222
|
interface TypeDiagnostic {
|
|
1099
1223
|
/** Usually an expression or statement; a type where the type is wrong
|
|
1100
|
-
* (`declare class A extends NotAClass`)
|
|
1101
|
-
|
|
1224
|
+
* (`declare class A extends NotAClass`), or a block where nothing in it
|
|
1225
|
+
* is to blame (a function that never returns). Only its span is read. */
|
|
1226
|
+
node: Expression | Statement | TypeNode | Block;
|
|
1102
1227
|
message: string;
|
|
1103
1228
|
}
|
|
1104
1229
|
interface TypeAnalysis {
|
|
@@ -1132,7 +1257,7 @@ interface ExportedType {
|
|
|
1132
1257
|
}
|
|
1133
1258
|
/** What a module makes available to `import`. See `moduleExports`. */
|
|
1134
1259
|
interface ModuleExports {
|
|
1135
|
-
/** `export const` / `export let` / `export
|
|
1260
|
+
/** `export const` / `export let` / `export function` names. */
|
|
1136
1261
|
readonly values: ReadonlyMap<string, Type>;
|
|
1137
1262
|
/** `export type` names. */
|
|
1138
1263
|
readonly types: ReadonlyMap<string, ExportedType>;
|
|
@@ -1160,6 +1285,11 @@ interface AnalyzeTypesOptions {
|
|
|
1160
1285
|
resolveModule?: (specifier: string) => ModuleExports | undefined;
|
|
1161
1286
|
/** Emit assignability diagnostics (default: true). */
|
|
1162
1287
|
diagnostics?: boolean;
|
|
1288
|
+
/** Report each type name nothing declares: "Cannot find name 'Nope'".
|
|
1289
|
+
* Only meaningful when `libs` holds everything the file can name, so it
|
|
1290
|
+
* is off unless asked for — exactly like `analyzeScopes`'s
|
|
1291
|
+
* `reportUndeclared`. */
|
|
1292
|
+
reportUnknownTypes?: boolean;
|
|
1163
1293
|
}
|
|
1164
1294
|
declare function analyzeTypes(program: Program, scopes: ScopeAnalysis, options?: AnalyzeTypesOptions): TypeAnalysis;
|
|
1165
1295
|
/** The exports of an analyzed module, in the shape another module's
|
|
@@ -1168,6 +1298,20 @@ declare function moduleExports(program: Program, scopes: ScopeAnalysis, types: T
|
|
|
1168
1298
|
/** For `export ... from`: the same resolver the module was analyzed with. */
|
|
1169
1299
|
resolveModule?: (specifier: string) => ModuleExports | undefined): ModuleExports;
|
|
1170
1300
|
|
|
1301
|
+
/**
|
|
1302
|
+
* The types that belong to the language itself, available in every file with
|
|
1303
|
+
* or without a type library — as TypeScript's `Partial` and `ReturnType` are.
|
|
1304
|
+
*
|
|
1305
|
+
* They are written in luaut on top of `keyof`, `T[K]`, conditional types with
|
|
1306
|
+
* `infer`, mapped types and set difference; the analyzer knows none of these
|
|
1307
|
+
* names. A type library or the file itself may declare one of them again, and
|
|
1308
|
+
* that declaration wins.
|
|
1309
|
+
*
|
|
1310
|
+
* What a runtime provides — `print`, `string`, `game` — is not here: that is a
|
|
1311
|
+
* type library's job (`@luaut/lua`, `@luaut/roblox`).
|
|
1312
|
+
*/
|
|
1313
|
+
declare const PRELUDE_SOURCE = "\n-- In Luau only `nil` and `false` are falsy: `0` and `\"\"` are truthy.\n-- These are what truthiness narrowing computes, made available to write down.\ntype Falsy = nil | false\ntype Truthy<T> = T - Falsy\n\n-- `-` is set difference. Over a union it drops members; over a concrete type\n-- it simplifies away; over an opaque type (`unknown`, an unresolved parameter)\n-- it is kept, so `Exclude<unknown, 1>` stays `unknown - 1`.\ntype Exclude<T, U> = T - U\ntype Extract<T, U> = T extends U ? T : never\ntype NonNullable<T> = T - nil\n\ntype ReturnType<T> = T extends (...unknown) -> infer R ? R : never\ntype Parameters<T> = T extends (...infer P) -> unknown ? P : never\n\ntype Partial<T> = { [K in keyof T]?: T[K] }\ntype Required<T> = { [K in keyof T]-?: T[K] }\ntype Readonly<T> = { readonly [K in keyof T]: T[K] }\ntype Mutable<T> = { -readonly [K in keyof T]: T[K] }\n\ntype Pick<T, K> = { [P in K]: T[P] }\ntype Omit<T, K> = Pick<T, Exclude<keyof T, K>>\ntype Record<K, V> = { [P in K]: V }\n";
|
|
1314
|
+
|
|
1171
1315
|
interface ProjectHost {
|
|
1172
1316
|
/** A file's text, or `undefined` when there is no such file. */
|
|
1173
1317
|
readFile(path: string): string | undefined;
|
|
@@ -1182,7 +1326,7 @@ interface LuautConfig {
|
|
|
1182
1326
|
readonly directory: string;
|
|
1183
1327
|
/** The config file's text, for locating problems in it. */
|
|
1184
1328
|
readonly source: string;
|
|
1185
|
-
/** Type libraries to load, in order: `"
|
|
1329
|
+
/** Type libraries to load, in order: `"lua"`, `"@luaut/roblox"`, `"./types"`. */
|
|
1186
1330
|
readonly types: readonly string[];
|
|
1187
1331
|
/** Import path aliases, as in tsconfig: `{ "@shared/*": ["src/shared/*"] }`. */
|
|
1188
1332
|
readonly paths: Readonly<Record<string, readonly string[]>>;
|
|
@@ -1273,4 +1417,4 @@ declare const luautparser: {
|
|
|
1273
1417
|
readonly analyzeTypes: typeof analyzeTypes;
|
|
1274
1418
|
};
|
|
1275
1419
|
|
|
1276
|
-
export { type AnalyzeTypesOptions, type AnyType, type ArrayExpression, type ArrayPattern, type ArrayPatternElement, type ArrayType, type ArrayTypeNode, type AsConstExpression, type AssignmentStatement, type BaseNode, type BaseToken, type BinaryExpression, BinaryOperators, type Binding, type BindingId, type BindingKind, type BindingTarget, type Block, type BooleanLiteral, type BreakStatement, CONFIG_FILE_NAMES, type CallExpression, type CallStatement, type ClassInfo, type CompoundAssignmentStatement, type ConditionalType, type ConditionalTypeNode, type ConfigLookup, type ConfigProblem, type ContinueStatement, type DeclareClassStatement, type DeclareStatement, type DifferenceType, type DifferenceTypeNode, type DoStatement, type EOFToken, type ErrorStatement, type ExportAllStatement, type ExportDefaultStatement, type ExportNamedStatement, type ExportSpecifier, type ExportStatement, type ExportTypeAliasStatement, type ExportedType, type Expression, type FunctionBody, type FunctionDeclaration, type FunctionDeclarationStatement, type FunctionExpression, type FunctionName, type FunctionParam, type FunctionParameter, type FunctionSignature, type FunctionType, type FunctionTypeNode, type FunctionTypeParameter, type GenericForStatement, type GenericRefType, type GenericTypeParameter, type Identifier, type IdentifierPattern, type IdentifierToken, type IfClause, type IfElseExpression, type IfStatement, type ImportSpecifier, type ImportStatement, type IndexExpression, type IndexedAccessType, type IndexedAccessTypeNode, type InferType, type InferTypeNode, type InterpolatedStringExpression, type InterpolatedStringPart, type InterpolatedStringPart_Expression, type InterpolatedStringPart_String, type InterpolatedStringToken, type IntersectionType, type IntersectionTypeNode, type KeyofType, type KeyofTypeNode, type KeywordToken, Keywords, LexError, type LiteralToken, type LiteralType, type LuautConfig, type MappedType, type MappedTypeNode, type MemberExpression, type MethodCallExpression, type ModuleExports, type NeverType, type NilLiteral, type Node, type NumberLiteral, type NumericForStatement, type ObjectPattern, type ObjectPatternProperty, type ObjectProperty, type ObjectType, type OperatorToken, Operators, type ParenthesizedExpression, type ParenthesizedTypeNode, ParseError, type ParserOptions, type PrimitiveName, type PrimitiveType, type Program, type ProjectHost, type PunctuatorToken, Punctuators, type RecoverResult, type RepeatStatement, type ReturnStatement, type SatisfiesExpression, type ScopeAnalysis, type ScopeDiagnostic, type SourceMapNode, type SourceMapOptions, type SourceMapTypes, type SpreadElement, type Statement, type StringLiteral, type TableExpression, type TableField, type TableTypeNode, type TableTypeProperty, type TemplateLiteralType, type TemplateLiteralTypeNode, type Token, type TupleType, type TupleTypeNode, type Type, type TypeAliasStatement, type TypeAnalysis, type TypeAssertionExpression, type TypeDiagnostic, type TypeLibraries, type TypeLiteralBoolean, type TypeLiteralNumber, type TypeLiteralString, type TypeNode, type TypePackNode, type TypeParamType, type TypePredicate, type TypePredicateNode, type TypeReference, type TypedIdentifier, type TypeofTypeNode, type UnaryExpression, UnaryOperators, type UnionType, type UnionTypeNode, type UnknownType, type VarargExpression, type VariableDeclaration, type VariadicTypeNode, type WhileStatement, analyzeScopes, analyzeTypes, anyType, arrayOf, booleanType, bufferType, containsTypeParam, luautparser as default, difference, equalTypes, falsyType, findConfig, fn, formatType, getBinding, intersection, isAssignable, isClassType, isGlobal, isPossiblyFalsy, isPossiblyTruthy, isUnassignedGlobal, literal, loadConfig, luautparser, matchInfer, moduleCandidates, moduleExports, narrowExclude, narrowFalsy, narrowTo, narrowTruthy, neverType, nilType, nodeHost, numberType, objectType, optional, overlaps, parse, parseExpressionFromSource, parseTokens, parseWithRecovery, primitive, resolveModulePath, resolveTypeLibraries, setAliasExpander, sourceMapTypes, stringType, stripJsonComments, substitute, templateMatches, threadType, tokenize, tuple, typeParam, unify, union, unknownType, widen };
|
|
1420
|
+
export { type AnalyzeTypesOptions, type AnyType, type ArrayExpression, type ArrayPattern, type ArrayPatternElement, type ArrayType, type ArrayTypeNode, type AsConstExpression, type AssignmentStatement, type BaseNode, type BaseToken, type BinaryExpression, BinaryOperators, type Binding, type BindingId, type BindingKind, type BindingTarget, type Block, type BooleanLiteral, type BreakStatement, CONFIG_FILE_NAMES, type CallExpression, type CallStatement, type ClassInfo, type CompoundAssignmentStatement, type ConditionalType, type ConditionalTypeNode, type ConfigLookup, type ConfigProblem, type ContinueStatement, type DeclareClassStatement, type DeclareStatement, type DifferenceType, type DifferenceTypeNode, type Directive, type DirectiveKind, type DirectiveOutcome, type Directives, type DoStatement, type EOFToken, type ErrorExpression, type ErrorStatement, type ExportAllStatement, type ExportDefaultStatement, type ExportNamedStatement, type ExportSpecifier, type ExportStatement, type ExportTypeAliasStatement, type ExportedType, type Expression, type FunctionBody, type FunctionDeclaration, type FunctionDeclarationStatement, type FunctionExpression, type FunctionName, type FunctionParam, type FunctionParameter, type FunctionSignature, type FunctionType, type FunctionTypeNode, type FunctionTypeParameter, type GenericForStatement, type GenericRefType, type GenericTypeParameter, type Identifier, type IdentifierPattern, type IdentifierToken, type IfClause, type IfElseExpression, type IfStatement, type ImportSpecifier, type ImportStatement, type IndexExpression, type IndexedAccessType, type IndexedAccessTypeNode, type InferType, type InferTypeNode, type InterpolatedStringExpression, type InterpolatedStringPart, type InterpolatedStringPart_Expression, type InterpolatedStringPart_String, type InterpolatedStringToken, type IntersectionType, type IntersectionTypeNode, type KeyofType, type KeyofTypeNode, type KeywordToken, Keywords, LexError, type LiteralToken, type LiteralType, type LuautConfig, type MappedType, type MappedTypeNode, type MemberExpression, type MethodCallExpression, type ModuleExports, type NeverType, type NilLiteral, type Node, type NumberLiteral, type NumericForStatement, type ObjectPattern, type ObjectPatternProperty, type ObjectProperty, type ObjectType, type OperatorToken, Operators, PRELUDE_SOURCE, type ParenthesizedExpression, type ParenthesizedTypeNode, ParseError, type ParserOptions, type PrimitiveName, type PrimitiveType, type Program, type ProjectHost, type PunctuatorToken, Punctuators, type RecoverResult, type RepeatStatement, type ReturnStatement, type SatisfiesExpression, type ScopeAnalysis, type ScopeDiagnostic, type SourceComment, type SourceMapNode, type SourceMapOptions, type SourceMapTypes, type SpreadElement, type Statement, type StringLiteral, type TableExpression, type TableField, type TableTypeNode, type TableTypeProperty, type TemplateLiteralType, type TemplateLiteralTypeNode, type Token, type TokenizeOptions, type TupleType, type TupleTypeNode, type Type, type TypeAliasStatement, type TypeAnalysis, type TypeAssertionExpression, type TypeDiagnostic, type TypeLibraries, type TypeLiteralBoolean, type TypeLiteralNumber, type TypeLiteralString, type TypeNode, type TypePackNode, type TypeParamType, type TypePredicate, type TypePredicateNode, type TypeReference, type TypedIdentifier, type TypeofTypeNode, UNUSED_EXPECT_ERROR, type UnaryExpression, UnaryOperators, type UnionType, type UnionTypeNode, type UnknownType, type VarargExpression, type VariableDeclaration, type VariadicTypeNode, type WhileStatement, analyzeScopes, analyzeTypes, anyType, applyDirectives, arrayOf, booleanType, bufferType, containsTypeParam, luautparser as default, difference, directivesOf, equalTypes, falsyType, findConfig, fn, formatType, getBinding, intersection, isAssignable, isClassType, isGlobal, isPossiblyFalsy, isPossiblyTruthy, isUnassignedGlobal, literal, loadConfig, luautparser, matchInfer, moduleCandidates, moduleExports, narrowExclude, narrowFalsy, narrowTo, narrowTruthy, neverType, nilType, nodeHost, numberType, objectType, optional, overlaps, parse, parseExpressionFromSource, parseTokens, parseWithRecovery, primitive, readDirectives, resolveModulePath, resolveTypeLibraries, setAliasExpander, sourceMapTypes, stringType, stripJsonComments, substitute, templateMatches, threadType, tokenize, tuple, typeParam, unify, union, unknownType, widen };
|