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

Commit

Permalink
refactor(rome_js_analyze): add new TypeSCript globals (#4644)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos authored Jul 1, 2023
1 parent bbe819e commit 67ac1d3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ multiple files:

#### Other changes

- Add new TypeScript globals (`AsyncDisposable`, `Awaited`, `DecoratorContext`, and others) [4643](https://github.com/rome/tools/issues/4643).

- [`noRedeclare`](https://docs.rome.tools/lint/rules/noredeclare/): allow redeclare of index signatures are in different type members [#4478](https://github.com/rome/tools/issues/4478)

- Fix a crash in the [`NoParameterAssign`](https://docs.rome.tools/lint/rules/noparameterassign/) rule that occurred when there was a bogus binding. [#4323](https://github.com/rome/tools/issues/4323)
Expand Down
32 changes: 29 additions & 3 deletions crates/rome_js_analyze/src/globals/typescript.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
pub const TYPESCRIPT_BUILTIN: [&str; 114] = [
pub const TYPESCRIPT_BUILTIN: [&str; 140] = [
"AggregateErrorConstructor",
"ArrayBufferConstructor",
"ArrayBufferLike",
"ArrayBufferTypes",
"ArrayBufferView",
"ArrayConstructor",
"ArrayLike",
"AsyncDisposable",
"AsyncDisposableStack",
"AsyncDisposableStackConstructor",
"AsyncGenerator",
"AsyncGeneratorFunction",
"AsyncGeneratorFunctionConstructor",
"AsyncIterable",
"AsyncIterableIterator",
"AsyncIterator",
"Atomics",
"Awaited",
"BigInt64ArrayConstructor",
"BigIntConstructor",
"BigIntToLocaleStringOptions",
Expand All @@ -22,13 +26,29 @@ pub const TYPESCRIPT_BUILTIN: [&str; 114] = [
"BufferSource",
"CallableFunction",
"Capitalize",
"ClassAccessorDecoratorContext",
"ClassAccessorDecoratorResult",
"ClassAccessorDecoratorTarget",
"ClassDecorator",
"ClassDecoratorContext",
"ClassFieldDecoratorContext",
"ClassGetterDecoratorContext",
"ClassMemberDecoratorContext",
"ClassMethodDecoratorContext",
"ClassSetterDecoratorContext",
"ConcatArray",
"Console",
"ConstructorParameters",
"DataViewConstructor",
"DateConstructor",
"DecoratorContext",
"DecoratorMetadata",
"DecoratorMetadataObject",
"Disposable",
"DisposableStack",
"DisposableStackConstructor",
"ErrorConstructor",
"ErrorOptions",
"EvalErrorConstructor",
"Exclude",
"Extract",
Expand All @@ -41,6 +61,8 @@ pub const TYPESCRIPT_BUILTIN: [&str; 114] = [
"GeneratorFunction",
"GeneratorFunctionConstructor",
"IArguments",
"ImportAssertions",
"ImportCallOptions",
"ImportMeta",
"InstanceType",
"Int16ArrayConstructor",
Expand Down Expand Up @@ -88,28 +110,32 @@ pub const TYPESCRIPT_BUILTIN: [&str; 114] = [
"ReferenceErrorConstructor",
"RegExpConstructor",
"RegExpExecArray",
"RegExpIndicesArray",
"RegExpMatchArray",
"RequestInit",
"Required",
"ReturnType",
"SetConstructor",
"SharedArrayBufferConstructor",
"StringConstructor",
"SuppressedErrorConstructor",
"SymbolConstructor",
"SyntaxErrorConstructor",
"TemplateStringsArray",
"Thenable",
"ThisParameterType",
"ThisType",
"TypeErrorConstructor",
"TypedPropertyDescriptor",
"URIErrorConstructor",
"TypeErrorConstructor",
"Uint16ArrayConstructor",
"Uint32ArrayConstructor",
"Uint8ArrayConstructor",
"Uint8ClampedArrayConstructor",
"Uncapitalize",
"Uppercase",
"URIErrorConstructor",
"WeakKey",
"WeakKeyTypes",
"WeakMapConstructor",
"WeakRefConstructor",
"WeakSetConstructor",
Expand Down

0 comments on commit 67ac1d3

Please sign in to comment.