Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
feat(lint): add missing TypeScript types (#1646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos authored Jul 16, 2021
1 parent 3a4a0bd commit aa638b1
Showing 1 changed file with 105 additions and 25 deletions.
130 changes: 105 additions & 25 deletions internal/compiler/lint/rules/js/noUndeclaredVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,120 @@ const BROWSER_VARIABLES_SET = new Set([

// This is gross...
const TS_VARIABLES_SET = new Set([
"MethodDecorator",
"ParameterDecorator",
"PromiseConstructorLike",
"PromiseLike",
"Promise",
"AggregateErrorConstructor",
"ArrayBufferConstructor",
"ArrayBufferLike",
"ArrayBufferTypes",
"ArrayBufferView",
"ArrayConstructor",
"ArrayLike",
"ReadonlyArray",
"Partial",
"Required",
"Readonly",
"Pick",
"Record",
"AsyncGenerator",
"AsyncGeneratorFunction",
"AsyncGeneratorFunctionConstructor",
"AsyncIterable",
"AsyncIterableIterator",
"AsyncIterator",
"Atomics",
"BigInt64ArrayConstructor",
"BigIntConstructor",
"BigIntToLocaleStringOptions",
"BigUint64ArrayConstructor",
"BooleanConstructor",
"BufferEncoding",
"BufferSource",
"CallableFunction",
"Capitalize",
"ClassDecorator",
"ConcatArray",
"Console",
"ConstructorParameters",
"DataViewConstructor",
"DateConstructor",
"ErrorConstructor",
"EvalErrorConstructor",
"Exclude",
"Extract",
"Omit",
"NonNullable",
"Parameters",
"ConstructorParameters",
"ReturnType",
"FinalizationRegistryConstructor",
"FlatArray",
"Float32ArrayConstructor",
"Float64ArrayConstructor",
"FunctionConstructor",
"Generator",
"GeneratorFunction",
"GeneratorFunctionConstructor",
"IArguments",
"ImportMeta",
"InstanceType",
"ThisType",
"NodeJS",
"NodeRequire",
"Int16ArrayConstructor",
"Int32ArrayConstructor",
"Int8ArrayConstructor",
"Iterable",
"IterableIterator",
"ArrayBufferView",
"Iterator",
"IteratorResult",
"IteratorReturnResult",
"IteratorYieldResult",
"Lowercase",
"MapConstructor",
"MethodDecorator",
"NewableFunction",
"NodeJS",
"NodeRequire",
"NonNullable",
"NumberConstructor",
"ObjectConstructor",
"Omit",
"OmitThisParameter",
"ParameterDecorator",
"Parameters",
"Partial",
"Pick",
"PromiseConstructor",
"PromiseConstructorLike",
"PromiseFulfilledResult",
"PromiseLike",
"PromiseRejectedResult",
"PromiseSettledResult",
"PropertyDecorator",
"PropertyDescriptor",
"PropertyDescriptorMap",
"PropertyKey",
"ProxyConstructor",
"ProxyHandler",
"RangeErrorConstructor",
"Readonly",
"ReadonlyArray",
"ReadonlyMap",
"ReadonlySet",
"Record",
"ReferenceErrorConstructor",
"RegExpConstructor",
"RegExpExecArray",
"RegExpMatchArray",
"RequestInit",
"Required",
"ReturnType",
"SetConstructor",
"SharedArrayBufferConstructor",
"StringConstructor",
"SymbolConstructor",
"SyntaxErrorConstructor",
"TemplateStringsArray",
"BufferEncoding",
"Console",
"Thenable",
"ArrayBufferLike",
"BufferSource",
"RequestInit",
"ThisParameterType",
"ThisType",
"TypeErrorConstructor",
"TypedPropertyDescriptor",
"URIErrorConstructor",
"Uint16ArrayConstructor",
"Uint32ArrayConstructor",
"Uint8ArrayConstructor",
"Uint8ClampedArrayConstructor",
"Uncapitalize",
"Uppercase",
"WeakMapConstructor",
"WeakRefConstructor",
"WeakSetConstructor",
]);

export default createVisitor({
Expand Down

0 comments on commit aa638b1

Please sign in to comment.