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

refactor(rome_js_analyze): add new TypeSCript globals #4644

Merged
merged 1 commit into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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