From be7a623dee0fd2c306580bbffad88865c84ce3b7 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 2 Oct 2022 18:28:26 +0900 Subject: [PATCH 01/16] feat: update typescript to 4.9.1 --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 77e222ad7a8..ca2f8a48a26 100644 --- a/package.json +++ b/package.json @@ -104,10 +104,10 @@ "tmp": "^0.2.1", "ts-node": "^10.7.0", "tslint": "^6.1.3", - "typescript": ">=3.3.1 <4.9.0" + "typescript": ">=3.3.1 <4.8.3 || 4.9.1-beta" }, "resolutions": { - "typescript": "~4.8.3", + "typescript": "~4.9.1-beta", "@types/node": "^18.0.0", "//": "Pin jest to v29 across the repo", "@jest/create-cache-key-function": "^29", diff --git a/yarn.lock b/yarn.lock index 543fa9bbc68..44197b74548 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13622,10 +13622,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, "typescript@>=3.3.1 <4.9.0", "typescript@^3 || ^4", typescript@next, typescript@~4.8.3, typescript@~4.8.4: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== +typescript@*, "typescript@>=3.3.1 <4.8.3 || 4.9.1-beta", "typescript@^3 || ^4", typescript@next, typescript@~4.8.4, typescript@~4.9.1-beta: + version "4.9.1-beta" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.1-beta.tgz#b5fe1b26f2fe3aeb14790927b25372bebf351c67" + integrity sha512-D4c0t1+sMOS5Hy8DQsGFfEYUuKzolXhf+7e/N0Td5etBPflEYzVwWLBrbVgHpLpLC53OJQCtxk31+NWO2SBPaA== ua-parser-js@^0.7.30: version "0.7.31" From 00882c29ccabdc25796b6332755a541741060837 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 2 Oct 2022 18:28:46 +0900 Subject: [PATCH 02/16] fix: add patch file for 4.9.1-beta --- ....8.3.patch => typescript+4.9.1-beta.patch} | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) rename patches/{typescript+4.8.3.patch => typescript+4.9.1-beta.patch} (51%) diff --git a/patches/typescript+4.8.3.patch b/patches/typescript+4.9.1-beta.patch similarity index 51% rename from patches/typescript+4.8.3.patch rename to patches/typescript+4.9.1-beta.patch index a33162f7dec..574addc105f 100644 --- a/patches/typescript+4.8.3.patch +++ b/patches/typescript+4.9.1-beta.patch @@ -1,32 +1,18 @@ diff --git a/node_modules/typescript/lib/typescript.d.ts b/node_modules/typescript/lib/typescript.d.ts -index 0fd60ae..02f4fe7 100644 +index 0e6b255..92d7cf6 100644 --- a/node_modules/typescript/lib/typescript.d.ts +++ b/node_modules/typescript/lib/typescript.d.ts -@@ -425,8 +425,8 @@ declare namespace ts { - JSDocFunctionType = 317, - JSDocVariadicType = 318, - JSDocNamepathType = 319, +@@ -428,8 +428,8 @@ declare namespace ts { + JSDocFunctionType = 320, + JSDocVariadicType = 321, + JSDocNamepathType = 322, + /** @deprecated This was only added in 4.7 */ - JSDoc = 320, + JSDoc = 323, - /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 320, - JSDocText = 321, - JSDocTypeLiteral = 322, -@@ -4374,7 +4374,13 @@ declare namespace ts { - function symbolName(symbol: Symbol): string; - function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; - function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; -+ /** -+ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getModifiers from `@typescript-eslint/type-utils`. -+ */ - function getDecorators(node: HasDecorators): readonly Decorator[] | undefined; -+ /** -+ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getDecorators from `@typescript-eslint/type-utils`. -+ */ - function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; - /** - * Gets the JSDoc parameter tags for the node if present. -@@ -4834,7 +4840,13 @@ declare namespace ts { + JSDocComment = 323, + JSDocText = 324, + JSDocTypeLiteral = 325, +@@ -4857,7 +4857,13 @@ declare namespace ts { } declare namespace ts { function setTextRange(range: T, location: TextRange | undefined): T; @@ -40,7 +26,7 @@ index 0fd60ae..02f4fe7 100644 function canHaveDecorators(node: Node): node is HasDecorators; } declare namespace ts { -@@ -7924,7 +7936,7 @@ declare namespace ts { +@@ -7951,7 +7957,7 @@ declare namespace ts { * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; * ``` */ From 692b86c1d5431da33dd87e5fed6e78e974c9178f Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 2 Oct 2022 18:36:53 +0900 Subject: [PATCH 03/16] feat(typescript-estree): update version range --- .../typescript-estree/src/parseSettings/warnAboutTSVersion.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts index 6bd890bdae9..b5dc97358e5 100644 --- a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts +++ b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts @@ -6,13 +6,13 @@ import type { ParseSettings } from './index'; * This needs to be kept in sync with the top-level README.md in the * typescript-eslint monorepo */ -const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <4.9.0'; +const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <5.0.0'; /* * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one * List them all separately here, so we can automatically create the full string */ -const SUPPORTED_PRERELEASE_RANGES: string[] = []; +const SUPPORTED_PRERELEASE_RANGES: string[] = ['4.9.1-beta']; const ACTIVE_TYPESCRIPT_VERSION = ts.version; const isRunningSupportedTypeScriptVersion = semver.satisfies( ACTIVE_TYPESCRIPT_VERSION, From 7e68835dce6d416bcbf0461cfc1f1fd531e0ee22 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 2 Oct 2022 18:56:44 +0900 Subject: [PATCH 04/16] feat: run `generate-lib` script --- .../scope-manager/src/lib/dom.iterable.ts | 2 +- packages/scope-manager/src/lib/dom.ts | 20 ++++-- .../src/lib/es2015.collection.ts | 4 +- packages/scope-manager/src/lib/es2015.core.ts | 2 +- .../scope-manager/src/lib/es2015.generator.ts | 4 +- .../scope-manager/src/lib/es2015.iterable.ts | 4 +- .../scope-manager/src/lib/es2015.promise.ts | 2 +- .../scope-manager/src/lib/es2015.proxy.ts | 2 +- .../scope-manager/src/lib/es2015.reflect.ts | 2 +- .../scope-manager/src/lib/es2015.symbol.ts | 2 +- .../src/lib/es2015.symbol.wellknown.ts | 4 +- packages/scope-manager/src/lib/es2015.ts | 6 +- .../src/lib/es2016.array.include.ts | 2 +- packages/scope-manager/src/lib/es2016.full.ts | 8 +-- packages/scope-manager/src/lib/es2016.ts | 2 +- packages/scope-manager/src/lib/es2017.full.ts | 8 +-- packages/scope-manager/src/lib/es2017.intl.ts | 2 +- .../scope-manager/src/lib/es2017.object.ts | 2 +- .../src/lib/es2017.sharedmemory.ts | 4 +- .../scope-manager/src/lib/es2017.string.ts | 2 +- packages/scope-manager/src/lib/es2017.ts | 4 +- .../src/lib/es2017.typedarrays.ts | 2 +- .../src/lib/es2018.asyncgenerator.ts | 4 +- .../src/lib/es2018.asynciterable.ts | 6 +- packages/scope-manager/src/lib/es2018.full.ts | 8 +-- packages/scope-manager/src/lib/es2018.intl.ts | 2 +- .../scope-manager/src/lib/es2018.promise.ts | 2 +- .../scope-manager/src/lib/es2018.regexp.ts | 2 +- packages/scope-manager/src/lib/es2018.ts | 6 +- .../scope-manager/src/lib/es2019.array.ts | 2 +- packages/scope-manager/src/lib/es2019.full.ts | 8 +-- packages/scope-manager/src/lib/es2019.intl.ts | 11 ++++ .../scope-manager/src/lib/es2019.object.ts | 4 +- .../scope-manager/src/lib/es2019.string.ts | 2 +- .../scope-manager/src/lib/es2019.symbol.ts | 2 +- packages/scope-manager/src/lib/es2019.ts | 4 +- .../scope-manager/src/lib/es2020.bigint.ts | 4 +- packages/scope-manager/src/lib/es2020.date.ts | 4 +- packages/scope-manager/src/lib/es2020.full.ts | 8 +-- packages/scope-manager/src/lib/es2020.intl.ts | 4 +- .../scope-manager/src/lib/es2020.number.ts | 4 +- .../scope-manager/src/lib/es2020.promise.ts | 2 +- .../src/lib/es2020.sharedmemory.ts | 2 +- .../scope-manager/src/lib/es2020.string.ts | 4 +- .../src/lib/es2020.symbol.wellknown.ts | 4 +- packages/scope-manager/src/lib/es2020.ts | 4 +- packages/scope-manager/src/lib/es2021.full.ts | 8 +-- packages/scope-manager/src/lib/es2021.intl.ts | 2 +- .../scope-manager/src/lib/es2021.promise.ts | 4 +- .../scope-manager/src/lib/es2021.string.ts | 2 +- packages/scope-manager/src/lib/es2021.ts | 4 +- .../scope-manager/src/lib/es2021.weakref.ts | 4 +- .../scope-manager/src/lib/es2022.array.ts | 2 +- .../scope-manager/src/lib/es2022.error.ts | 2 +- packages/scope-manager/src/lib/es2022.full.ts | 8 +-- packages/scope-manager/src/lib/es2022.intl.ts | 2 +- .../scope-manager/src/lib/es2022.object.ts | 2 +- .../src/lib/es2022.sharedmemory.ts | 2 +- .../scope-manager/src/lib/es2022.string.ts | 2 +- packages/scope-manager/src/lib/es2022.ts | 2 +- packages/scope-manager/src/lib/es5.ts | 2 +- packages/scope-manager/src/lib/es6.ts | 6 +- packages/scope-manager/src/lib/es7.ts | 2 +- .../scope-manager/src/lib/esnext.array.ts | 2 +- .../src/lib/esnext.asynciterable.ts | 6 +- .../scope-manager/src/lib/esnext.bigint.ts | 4 +- packages/scope-manager/src/lib/esnext.full.ts | 8 +-- packages/scope-manager/src/lib/esnext.intl.ts | 2 +- .../scope-manager/src/lib/esnext.promise.ts | 4 +- .../scope-manager/src/lib/esnext.string.ts | 2 +- .../scope-manager/src/lib/esnext.symbol.ts | 2 +- packages/scope-manager/src/lib/esnext.ts | 2 +- .../scope-manager/src/lib/esnext.weakref.ts | 4 +- packages/scope-manager/src/lib/index.ts | 64 ++++++++++--------- packages/scope-manager/src/lib/lib.ts | 6 +- packages/scope-manager/src/lib/scripthost.ts | 4 +- .../src/lib/webworker.importscripts.ts | 2 +- .../src/lib/webworker.iterable.ts | 2 +- packages/scope-manager/src/lib/webworker.ts | 8 ++- packages/types/src/lib.ts | 1 + 80 files changed, 200 insertions(+), 172 deletions(-) create mode 100644 packages/scope-manager/src/lib/es2019.intl.ts diff --git a/packages/scope-manager/src/lib/dom.iterable.ts b/packages/scope-manager/src/lib/dom.iterable.ts index d294d684ddc..225c4f28b84 100644 --- a/packages/scope-manager/src/lib/dom.iterable.ts +++ b/packages/scope-manager/src/lib/dom.iterable.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const dom_iterable = { diff --git a/packages/scope-manager/src/lib/dom.ts b/packages/scope-manager/src/lib/dom.ts index dd8523bc66e..311dbe1db7e 100644 --- a/packages/scope-manager/src/lib/dom.ts +++ b/packages/scope-manager/src/lib/dom.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; export const dom = { @@ -66,7 +66,7 @@ export const dom = { DeviceMotionEventInit: TYPE, DeviceMotionEventRotationRateInit: TYPE, DeviceOrientationEventInit: TYPE, - DisplayMediaStreamConstraints: TYPE, + DisplayMediaStreamOptions: TYPE, DocumentTimelineOptions: TYPE, DoubleRange: TYPE, DragEventInit: TYPE, @@ -143,7 +143,6 @@ export const dom = { MediaMetadataInit: TYPE, MediaPositionState: TYPE, MediaQueryListEventInit: TYPE, - MediaRecorderErrorEventInit: TYPE, MediaRecorderOptions: TYPE, MediaSessionActionDetails: TYPE, MediaStreamAudioSourceOptions: TYPE, @@ -184,6 +183,7 @@ export const dom = { PeriodicWaveConstraints: TYPE, PeriodicWaveOptions: TYPE, PermissionDescriptor: TYPE, + PictureInPictureEventInit: TYPE, PointerEventInit: TYPE, PopStateEventInit: TYPE, PositionOptions: TYPE, @@ -243,6 +243,7 @@ export const dom = { RTCStats: TYPE, RTCTrackEventInit: TYPE, RTCTransportStats: TYPE, + ReadableStreamGetReaderOptions: TYPE, ReadableStreamReadDoneResult: TYPE, ReadableStreamReadValueResult: TYPE, ReadableWritablePair: TYPE, @@ -284,6 +285,8 @@ export const dom = { TransitionEventInit: TYPE, UIEventInit: TYPE, ULongRange: TYPE, + UnderlyingByteSource: TYPE, + UnderlyingDefaultSource: TYPE, UnderlyingSink: TYPE, UnderlyingSource: TYPE, ValidityStateFlags: TYPE, @@ -350,10 +353,13 @@ export const dom = { CSSConditionRule: TYPE_VALUE, CSSCounterStyleRule: TYPE_VALUE, CSSFontFaceRule: TYPE_VALUE, + CSSFontPaletteValuesRule: TYPE_VALUE, CSSGroupingRule: TYPE_VALUE, CSSImportRule: TYPE_VALUE, CSSKeyframeRule: TYPE_VALUE, CSSKeyframesRule: TYPE_VALUE, + CSSLayerBlockRule: TYPE_VALUE, + CSSLayerStatementRule: TYPE_VALUE, CSSMediaRule: TYPE_VALUE, CSSNamespaceRule: TYPE_VALUE, CSSPageRule: TYPE_VALUE, @@ -449,6 +455,7 @@ export const dom = { EXT_frag_depth: TYPE, EXT_sRGB: TYPE, EXT_shader_texture_lod: TYPE, + EXT_texture_compression_bptc: TYPE, EXT_texture_compression_rgtc: TYPE, EXT_texture_filter_anisotropic: TYPE, ElementEventMap: TYPE, @@ -641,7 +648,6 @@ export const dom = { MediaQueryListEvent: TYPE_VALUE, MediaRecorderEventMap: TYPE, MediaRecorder: TYPE_VALUE, - MediaRecorderErrorEvent: TYPE_VALUE, MediaSession: TYPE_VALUE, MediaSourceEventMap: TYPE, MediaSource: TYPE_VALUE, @@ -724,6 +730,7 @@ export const dom = { PermissionStatusEventMap: TYPE, PermissionStatus: TYPE_VALUE, Permissions: TYPE_VALUE, + PictureInPictureEvent: TYPE_VALUE, PictureInPictureWindowEventMap: TYPE, PictureInPictureWindow: TYPE_VALUE, Plugin: TYPE_VALUE, @@ -1123,8 +1130,6 @@ export const dom = { TimerHandler: TYPE, Transferable: TYPE, Uint32List: TYPE, - UvmEntries: TYPE, - UvmEntry: TYPE, VibratePattern: TYPE, WindowProxy: TYPE, XMLHttpRequestBodyInit: TYPE, @@ -1227,7 +1232,6 @@ export const dom = { RTCIceCandidateType: TYPE, RTCIceComponent: TYPE, RTCIceConnectionState: TYPE, - RTCIceCredentialType: TYPE, RTCIceGathererState: TYPE, RTCIceGatheringState: TYPE, RTCIceProtocol: TYPE, @@ -1243,6 +1247,8 @@ export const dom = { RTCSignalingState: TYPE, RTCStatsIceCandidatePairState: TYPE, RTCStatsType: TYPE, + ReadableStreamReaderMode: TYPE, + ReadableStreamType: TYPE, ReadyState: TYPE, RecordingState: TYPE, ReferrerPolicy: TYPE, diff --git a/packages/scope-manager/src/lib/es2015.collection.ts b/packages/scope-manager/src/lib/es2015.collection.ts index 51386ebcc74..98933f1c1fd 100644 --- a/packages/scope-manager/src/lib/es2015.collection.ts +++ b/packages/scope-manager/src/lib/es2015.collection.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2015_collection = { Map: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/es2015.core.ts b/packages/scope-manager/src/lib/es2015.core.ts index f9475d7db1d..ba44cf290b4 100644 --- a/packages/scope-manager/src/lib/es2015.core.ts +++ b/packages/scope-manager/src/lib/es2015.core.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_core = { diff --git a/packages/scope-manager/src/lib/es2015.generator.ts b/packages/scope-manager/src/lib/es2015.generator.ts index 90d26e1ea0d..f5dce9611ae 100644 --- a/packages/scope-manager/src/lib/es2015.generator.ts +++ b/packages/scope-manager/src/lib/es2015.generator.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2015_generator = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2015.iterable.ts b/packages/scope-manager/src/lib/es2015.iterable.ts index 2ab60a44b84..d27ab2efcc6 100644 --- a/packages/scope-manager/src/lib/es2015.iterable.ts +++ b/packages/scope-manager/src/lib/es2015.iterable.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; +import { TYPE } from './base-config'; export const es2015_iterable = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2015.promise.ts b/packages/scope-manager/src/lib/es2015.promise.ts index a3896e0f46f..1334b2abca4 100644 --- a/packages/scope-manager/src/lib/es2015.promise.ts +++ b/packages/scope-manager/src/lib/es2015.promise.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_promise = { diff --git a/packages/scope-manager/src/lib/es2015.proxy.ts b/packages/scope-manager/src/lib/es2015.proxy.ts index 2dbc6e22263..d2c0d9b6616 100644 --- a/packages/scope-manager/src/lib/es2015.proxy.ts +++ b/packages/scope-manager/src/lib/es2015.proxy.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_proxy = { diff --git a/packages/scope-manager/src/lib/es2015.reflect.ts b/packages/scope-manager/src/lib/es2015.reflect.ts index dcc2a5d910b..4a71e4b9def 100644 --- a/packages/scope-manager/src/lib/es2015.reflect.ts +++ b/packages/scope-manager/src/lib/es2015.reflect.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2015_reflect = { diff --git a/packages/scope-manager/src/lib/es2015.symbol.ts b/packages/scope-manager/src/lib/es2015.symbol.ts index eef09036f87..c027cae3b38 100644 --- a/packages/scope-manager/src/lib/es2015.symbol.ts +++ b/packages/scope-manager/src/lib/es2015.symbol.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_symbol = { diff --git a/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts b/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts index 94fd4ac4e70..16d88e5ca57 100644 --- a/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts +++ b/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; +import { TYPE } from './base-config'; export const es2015_symbol_wellknown = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2015.ts b/packages/scope-manager/src/lib/es2015.ts index f6a8aa8ab73..9e225bddb33 100644 --- a/packages/scope-manager/src/lib/es2015.ts +++ b/packages/scope-manager/src/lib/es2015.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es5 } from './es5'; -import { es2015_collection } from './es2015.collection'; import { es2015_core } from './es2015.core'; -import { es2015_generator } from './es2015.generator'; +import { es2015_collection } from './es2015.collection'; import { es2015_iterable } from './es2015.iterable'; +import { es2015_generator } from './es2015.generator'; import { es2015_promise } from './es2015.promise'; import { es2015_proxy } from './es2015.proxy'; import { es2015_reflect } from './es2015.reflect'; diff --git a/packages/scope-manager/src/lib/es2016.array.include.ts b/packages/scope-manager/src/lib/es2016.array.include.ts index 17c927bd467..7cab0a4c84d 100644 --- a/packages/scope-manager/src/lib/es2016.array.include.ts +++ b/packages/scope-manager/src/lib/es2016.array.include.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2016_array_include = { diff --git a/packages/scope-manager/src/lib/es2016.full.ts b/packages/scope-manager/src/lib/es2016.full.ts index e7fb9802cb7..cfc4632c7da 100644 --- a/packages/scope-manager/src/lib/es2016.full.ts +++ b/packages/scope-manager/src/lib/es2016.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2016 } from './es2016'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const es2016_full = { ...es2016, diff --git a/packages/scope-manager/src/lib/es2016.ts b/packages/scope-manager/src/lib/es2016.ts index f00abac6c4f..f4ac61374c3 100644 --- a/packages/scope-manager/src/lib/es2016.ts +++ b/packages/scope-manager/src/lib/es2016.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015 } from './es2015'; import { es2016_array_include } from './es2016.array.include'; diff --git a/packages/scope-manager/src/lib/es2017.full.ts b/packages/scope-manager/src/lib/es2017.full.ts index a1d8c386bb4..26d2c2b1f8c 100644 --- a/packages/scope-manager/src/lib/es2017.full.ts +++ b/packages/scope-manager/src/lib/es2017.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2017 } from './es2017'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const es2017_full = { ...es2017, diff --git a/packages/scope-manager/src/lib/es2017.intl.ts b/packages/scope-manager/src/lib/es2017.intl.ts index b8f1325672e..48e7fe21715 100644 --- a/packages/scope-manager/src/lib/es2017.intl.ts +++ b/packages/scope-manager/src/lib/es2017.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2017_intl = { diff --git a/packages/scope-manager/src/lib/es2017.object.ts b/packages/scope-manager/src/lib/es2017.object.ts index 66bea4e7d3f..17344ec6591 100644 --- a/packages/scope-manager/src/lib/es2017.object.ts +++ b/packages/scope-manager/src/lib/es2017.object.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2017_object = { diff --git a/packages/scope-manager/src/lib/es2017.sharedmemory.ts b/packages/scope-manager/src/lib/es2017.sharedmemory.ts index 998d41493fd..d5f3c8970b2 100644 --- a/packages/scope-manager/src/lib/es2017.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2017.sharedmemory.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; import { es2015_symbol_wellknown } from './es2015.symbol.wellknown'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2017_sharedmemory = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2017.string.ts b/packages/scope-manager/src/lib/es2017.string.ts index 64ec52f3074..8ca832f3cf8 100644 --- a/packages/scope-manager/src/lib/es2017.string.ts +++ b/packages/scope-manager/src/lib/es2017.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2017_string = { diff --git a/packages/scope-manager/src/lib/es2017.ts b/packages/scope-manager/src/lib/es2017.ts index 3cbafd35b16..c28a0b45236 100644 --- a/packages/scope-manager/src/lib/es2017.ts +++ b/packages/scope-manager/src/lib/es2017.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2016 } from './es2016'; -import { es2017_intl } from './es2017.intl'; import { es2017_object } from './es2017.object'; import { es2017_sharedmemory } from './es2017.sharedmemory'; import { es2017_string } from './es2017.string'; +import { es2017_intl } from './es2017.intl'; import { es2017_typedarrays } from './es2017.typedarrays'; export const es2017 = { diff --git a/packages/scope-manager/src/lib/es2017.typedarrays.ts b/packages/scope-manager/src/lib/es2017.typedarrays.ts index 8fdb9a96281..0c9a43160b8 100644 --- a/packages/scope-manager/src/lib/es2017.typedarrays.ts +++ b/packages/scope-manager/src/lib/es2017.typedarrays.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2017_typedarrays = { diff --git a/packages/scope-manager/src/lib/es2018.asyncgenerator.ts b/packages/scope-manager/src/lib/es2018.asyncgenerator.ts index 5af8bd0a663..68f67bd6483 100644 --- a/packages/scope-manager/src/lib/es2018.asyncgenerator.ts +++ b/packages/scope-manager/src/lib/es2018.asyncgenerator.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2018_asynciterable } from './es2018.asynciterable'; +import { TYPE } from './base-config'; export const es2018_asyncgenerator = { ...es2018_asynciterable, diff --git a/packages/scope-manager/src/lib/es2018.asynciterable.ts b/packages/scope-manager/src/lib/es2018.asynciterable.ts index 5d4e373ef76..ce4aebafb0d 100644 --- a/packages/scope-manager/src/lib/es2018.asynciterable.ts +++ b/packages/scope-manager/src/lib/es2018.asynciterable.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; -import { es2015_iterable } from './es2015.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; +import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2018_asynciterable = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2018.full.ts b/packages/scope-manager/src/lib/es2018.full.ts index 802e30c6659..8e0ab3621f2 100644 --- a/packages/scope-manager/src/lib/es2018.full.ts +++ b/packages/scope-manager/src/lib/es2018.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2018 } from './es2018'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const es2018_full = { ...es2018, diff --git a/packages/scope-manager/src/lib/es2018.intl.ts b/packages/scope-manager/src/lib/es2018.intl.ts index 9736c0ba48a..8496761b2d2 100644 --- a/packages/scope-manager/src/lib/es2018.intl.ts +++ b/packages/scope-manager/src/lib/es2018.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2018_intl = { diff --git a/packages/scope-manager/src/lib/es2018.promise.ts b/packages/scope-manager/src/lib/es2018.promise.ts index ac1e02d8a05..cc74f3b02b8 100644 --- a/packages/scope-manager/src/lib/es2018.promise.ts +++ b/packages/scope-manager/src/lib/es2018.promise.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2018_promise = { diff --git a/packages/scope-manager/src/lib/es2018.regexp.ts b/packages/scope-manager/src/lib/es2018.regexp.ts index 0fdf10f793a..7c1ca120117 100644 --- a/packages/scope-manager/src/lib/es2018.regexp.ts +++ b/packages/scope-manager/src/lib/es2018.regexp.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2018_regexp = { diff --git a/packages/scope-manager/src/lib/es2018.ts b/packages/scope-manager/src/lib/es2018.ts index d79390a3b87..a3b3fbe508c 100644 --- a/packages/scope-manager/src/lib/es2018.ts +++ b/packages/scope-manager/src/lib/es2018.ts @@ -3,13 +3,13 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2017 } from './es2017'; -import { es2018_asyncgenerator } from './es2018.asyncgenerator'; import { es2018_asynciterable } from './es2018.asynciterable'; -import { es2018_intl } from './es2018.intl'; +import { es2018_asyncgenerator } from './es2018.asyncgenerator'; import { es2018_promise } from './es2018.promise'; import { es2018_regexp } from './es2018.regexp'; +import { es2018_intl } from './es2018.intl'; export const es2018 = { ...es2017, diff --git a/packages/scope-manager/src/lib/es2019.array.ts b/packages/scope-manager/src/lib/es2019.array.ts index b682bb04457..6d814131f52 100644 --- a/packages/scope-manager/src/lib/es2019.array.ts +++ b/packages/scope-manager/src/lib/es2019.array.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2019_array = { diff --git a/packages/scope-manager/src/lib/es2019.full.ts b/packages/scope-manager/src/lib/es2019.full.ts index 8cee3178bc6..a97c713f5a0 100644 --- a/packages/scope-manager/src/lib/es2019.full.ts +++ b/packages/scope-manager/src/lib/es2019.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2019 } from './es2019'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const es2019_full = { ...es2019, diff --git a/packages/scope-manager/src/lib/es2019.intl.ts b/packages/scope-manager/src/lib/es2019.intl.ts new file mode 100644 index 00000000000..8e44ef6d0cd --- /dev/null +++ b/packages/scope-manager/src/lib/es2019.intl.ts @@ -0,0 +1,11 @@ +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager + +import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE } from './base-config'; + +export const es2019_intl = { + Intl: TYPE_VALUE, +} as Record; diff --git a/packages/scope-manager/src/lib/es2019.object.ts b/packages/scope-manager/src/lib/es2019.object.ts index f1f113ed54d..87f3bb33f45 100644 --- a/packages/scope-manager/src/lib/es2019.object.ts +++ b/packages/scope-manager/src/lib/es2019.object.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2019_object = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2019.string.ts b/packages/scope-manager/src/lib/es2019.string.ts index eae2a44d376..af1f1f8f2b5 100644 --- a/packages/scope-manager/src/lib/es2019.string.ts +++ b/packages/scope-manager/src/lib/es2019.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2019_string = { diff --git a/packages/scope-manager/src/lib/es2019.symbol.ts b/packages/scope-manager/src/lib/es2019.symbol.ts index b39b41add7a..5c8a1fd2894 100644 --- a/packages/scope-manager/src/lib/es2019.symbol.ts +++ b/packages/scope-manager/src/lib/es2019.symbol.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2019_symbol = { diff --git a/packages/scope-manager/src/lib/es2019.ts b/packages/scope-manager/src/lib/es2019.ts index 43e55a27a3a..e41e53c1524 100644 --- a/packages/scope-manager/src/lib/es2019.ts +++ b/packages/scope-manager/src/lib/es2019.ts @@ -3,12 +3,13 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2018 } from './es2018'; import { es2019_array } from './es2019.array'; import { es2019_object } from './es2019.object'; import { es2019_string } from './es2019.string'; import { es2019_symbol } from './es2019.symbol'; +import { es2019_intl } from './es2019.intl'; export const es2019 = { ...es2018, @@ -16,4 +17,5 @@ export const es2019 = { ...es2019_object, ...es2019_string, ...es2019_symbol, + ...es2019_intl, } as Record; diff --git a/packages/scope-manager/src/lib/es2020.bigint.ts b/packages/scope-manager/src/lib/es2020.bigint.ts index 52fbba1ca2e..3444dc701a2 100644 --- a/packages/scope-manager/src/lib/es2020.bigint.ts +++ b/packages/scope-manager/src/lib/es2020.bigint.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2020_intl } from './es2020.intl'; +import { TYPE, TYPE_VALUE } from './base-config'; export const es2020_bigint = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/es2020.date.ts b/packages/scope-manager/src/lib/es2020.date.ts index b4c3d319deb..1a5ed0d23f3 100644 --- a/packages/scope-manager/src/lib/es2020.date.ts +++ b/packages/scope-manager/src/lib/es2020.date.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2020_intl } from './es2020.intl'; +import { TYPE } from './base-config'; export const es2020_date = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/es2020.full.ts b/packages/scope-manager/src/lib/es2020.full.ts index 1de20eaecc4..6467ba7818d 100644 --- a/packages/scope-manager/src/lib/es2020.full.ts +++ b/packages/scope-manager/src/lib/es2020.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2020 } from './es2020'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const es2020_full = { ...es2020, diff --git a/packages/scope-manager/src/lib/es2020.intl.ts b/packages/scope-manager/src/lib/es2020.intl.ts index 2866dde791e..6cf997c0ca3 100644 --- a/packages/scope-manager/src/lib/es2020.intl.ts +++ b/packages/scope-manager/src/lib/es2020.intl.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2018_intl } from './es2018.intl'; +import { TYPE_VALUE } from './base-config'; export const es2020_intl = { ...es2018_intl, diff --git a/packages/scope-manager/src/lib/es2020.number.ts b/packages/scope-manager/src/lib/es2020.number.ts index 445b6073364..04ba01bc4bf 100644 --- a/packages/scope-manager/src/lib/es2020.number.ts +++ b/packages/scope-manager/src/lib/es2020.number.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2020_intl } from './es2020.intl'; +import { TYPE } from './base-config'; export const es2020_number = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/es2020.promise.ts b/packages/scope-manager/src/lib/es2020.promise.ts index 0352586806d..c875a4c7b31 100644 --- a/packages/scope-manager/src/lib/es2020.promise.ts +++ b/packages/scope-manager/src/lib/es2020.promise.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2020_promise = { diff --git a/packages/scope-manager/src/lib/es2020.sharedmemory.ts b/packages/scope-manager/src/lib/es2020.sharedmemory.ts index 180e291c0cc..e927965e621 100644 --- a/packages/scope-manager/src/lib/es2020.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2020.sharedmemory.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2020_sharedmemory = { diff --git a/packages/scope-manager/src/lib/es2020.string.ts b/packages/scope-manager/src/lib/es2020.string.ts index ef0a81e1ca8..c33be91dd3f 100644 --- a/packages/scope-manager/src/lib/es2020.string.ts +++ b/packages/scope-manager/src/lib/es2020.string.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2020_string = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts b/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts index 1e104700032..db8d79e9f44 100644 --- a/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts +++ b/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; import { es2015_symbol } from './es2015.symbol'; +import { TYPE } from './base-config'; export const es2020_symbol_wellknown = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2020.ts b/packages/scope-manager/src/lib/es2020.ts index c6b1140596b..3a89464f456 100644 --- a/packages/scope-manager/src/lib/es2020.ts +++ b/packages/scope-manager/src/lib/es2020.ts @@ -3,16 +3,16 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2019 } from './es2019'; import { es2020_bigint } from './es2020.bigint'; import { es2020_date } from './es2020.date'; -import { es2020_intl } from './es2020.intl'; import { es2020_number } from './es2020.number'; import { es2020_promise } from './es2020.promise'; import { es2020_sharedmemory } from './es2020.sharedmemory'; import { es2020_string } from './es2020.string'; import { es2020_symbol_wellknown } from './es2020.symbol.wellknown'; +import { es2020_intl } from './es2020.intl'; export const es2020 = { ...es2019, diff --git a/packages/scope-manager/src/lib/es2021.full.ts b/packages/scope-manager/src/lib/es2021.full.ts index e45a862ff2b..2bf87c06e1a 100644 --- a/packages/scope-manager/src/lib/es2021.full.ts +++ b/packages/scope-manager/src/lib/es2021.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2021 } from './es2021'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const es2021_full = { ...es2021, diff --git a/packages/scope-manager/src/lib/es2021.intl.ts b/packages/scope-manager/src/lib/es2021.intl.ts index e8cebf8ed07..f73cbe394ab 100644 --- a/packages/scope-manager/src/lib/es2021.intl.ts +++ b/packages/scope-manager/src/lib/es2021.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2021_intl = { diff --git a/packages/scope-manager/src/lib/es2021.promise.ts b/packages/scope-manager/src/lib/es2021.promise.ts index 20d1f1b313c..3607632e743 100644 --- a/packages/scope-manager/src/lib/es2021.promise.ts +++ b/packages/scope-manager/src/lib/es2021.promise.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2021_promise = { AggregateError: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/es2021.string.ts b/packages/scope-manager/src/lib/es2021.string.ts index 8b7aa25c5a5..28e9af00f37 100644 --- a/packages/scope-manager/src/lib/es2021.string.ts +++ b/packages/scope-manager/src/lib/es2021.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2021_string = { diff --git a/packages/scope-manager/src/lib/es2021.ts b/packages/scope-manager/src/lib/es2021.ts index c54cfc31ccb..43fd33f9abe 100644 --- a/packages/scope-manager/src/lib/es2021.ts +++ b/packages/scope-manager/src/lib/es2021.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2020 } from './es2020'; -import { es2021_intl } from './es2021.intl'; import { es2021_promise } from './es2021.promise'; import { es2021_string } from './es2021.string'; import { es2021_weakref } from './es2021.weakref'; +import { es2021_intl } from './es2021.intl'; export const es2021 = { ...es2020, diff --git a/packages/scope-manager/src/lib/es2021.weakref.ts b/packages/scope-manager/src/lib/es2021.weakref.ts index a65c90a8058..4a7ee2ea44c 100644 --- a/packages/scope-manager/src/lib/es2021.weakref.ts +++ b/packages/scope-manager/src/lib/es2021.weakref.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2021_weakref = { WeakRef: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/es2022.array.ts b/packages/scope-manager/src/lib/es2022.array.ts index 3927f26851e..95785becd3d 100644 --- a/packages/scope-manager/src/lib/es2022.array.ts +++ b/packages/scope-manager/src/lib/es2022.array.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_array = { diff --git a/packages/scope-manager/src/lib/es2022.error.ts b/packages/scope-manager/src/lib/es2022.error.ts index 282f66648bb..f1e1bc2fa0f 100644 --- a/packages/scope-manager/src/lib/es2022.error.ts +++ b/packages/scope-manager/src/lib/es2022.error.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_error = { diff --git a/packages/scope-manager/src/lib/es2022.full.ts b/packages/scope-manager/src/lib/es2022.full.ts index 1cf84cd17eb..3ef0dd62eca 100644 --- a/packages/scope-manager/src/lib/es2022.full.ts +++ b/packages/scope-manager/src/lib/es2022.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2022 } from './es2022'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const es2022_full = { ...es2022, diff --git a/packages/scope-manager/src/lib/es2022.intl.ts b/packages/scope-manager/src/lib/es2022.intl.ts index 22c7fc5694d..f91ef8640a0 100644 --- a/packages/scope-manager/src/lib/es2022.intl.ts +++ b/packages/scope-manager/src/lib/es2022.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2022_intl = { diff --git a/packages/scope-manager/src/lib/es2022.object.ts b/packages/scope-manager/src/lib/es2022.object.ts index ea209894d13..650a01c3835 100644 --- a/packages/scope-manager/src/lib/es2022.object.ts +++ b/packages/scope-manager/src/lib/es2022.object.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_object = { diff --git a/packages/scope-manager/src/lib/es2022.sharedmemory.ts b/packages/scope-manager/src/lib/es2022.sharedmemory.ts index 24d82d60912..8efb4b9d8c9 100644 --- a/packages/scope-manager/src/lib/es2022.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2022.sharedmemory.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_sharedmemory = { diff --git a/packages/scope-manager/src/lib/es2022.string.ts b/packages/scope-manager/src/lib/es2022.string.ts index 8cd490c9bc5..3c4e1a766cd 100644 --- a/packages/scope-manager/src/lib/es2022.string.ts +++ b/packages/scope-manager/src/lib/es2022.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_string = { diff --git a/packages/scope-manager/src/lib/es2022.ts b/packages/scope-manager/src/lib/es2022.ts index 0956c0111d6..6f23b9dcd57 100644 --- a/packages/scope-manager/src/lib/es2022.ts +++ b/packages/scope-manager/src/lib/es2022.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2021 } from './es2021'; import { es2022_array } from './es2022.array'; import { es2022_error } from './es2022.error'; diff --git a/packages/scope-manager/src/lib/es5.ts b/packages/scope-manager/src/lib/es5.ts index cef8eb253ce..888faf61520 100644 --- a/packages/scope-manager/src/lib/es5.ts +++ b/packages/scope-manager/src/lib/es5.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; export const es5 = { diff --git a/packages/scope-manager/src/lib/es6.ts b/packages/scope-manager/src/lib/es6.ts index 12bf80e84c9..57c3eca6234 100644 --- a/packages/scope-manager/src/lib/es6.ts +++ b/packages/scope-manager/src/lib/es6.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es5 } from './es5'; -import { es2015_collection } from './es2015.collection'; import { es2015_core } from './es2015.core'; -import { es2015_generator } from './es2015.generator'; +import { es2015_collection } from './es2015.collection'; import { es2015_iterable } from './es2015.iterable'; +import { es2015_generator } from './es2015.generator'; import { es2015_promise } from './es2015.promise'; import { es2015_proxy } from './es2015.proxy'; import { es2015_reflect } from './es2015.reflect'; diff --git a/packages/scope-manager/src/lib/es7.ts b/packages/scope-manager/src/lib/es7.ts index e79a1dd39c7..dd0ae5bef60 100644 --- a/packages/scope-manager/src/lib/es7.ts +++ b/packages/scope-manager/src/lib/es7.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015 } from './es2015'; import { es2016_array_include } from './es2016.array.include'; diff --git a/packages/scope-manager/src/lib/esnext.array.ts b/packages/scope-manager/src/lib/esnext.array.ts index e7d9824cf8c..87709c583e4 100644 --- a/packages/scope-manager/src/lib/esnext.array.ts +++ b/packages/scope-manager/src/lib/esnext.array.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const esnext_array = { diff --git a/packages/scope-manager/src/lib/esnext.asynciterable.ts b/packages/scope-manager/src/lib/esnext.asynciterable.ts index 2479b150904..22c97a07040 100644 --- a/packages/scope-manager/src/lib/esnext.asynciterable.ts +++ b/packages/scope-manager/src/lib/esnext.asynciterable.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE } from './base-config'; -import { es2015_iterable } from './es2015.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; +import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const esnext_asynciterable = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/esnext.bigint.ts b/packages/scope-manager/src/lib/esnext.bigint.ts index ccd2ae93293..079bc59bf87 100644 --- a/packages/scope-manager/src/lib/esnext.bigint.ts +++ b/packages/scope-manager/src/lib/esnext.bigint.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2020_intl } from './es2020.intl'; +import { TYPE, TYPE_VALUE } from './base-config'; export const esnext_bigint = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/esnext.full.ts b/packages/scope-manager/src/lib/esnext.full.ts index 2bae36c386e..5d7b43c2b66 100644 --- a/packages/scope-manager/src/lib/esnext.full.ts +++ b/packages/scope-manager/src/lib/esnext.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; +import { ImplicitLibVariableOptions } from '../variable'; import { esnext } from './esnext'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; export const esnext_full = { ...esnext, diff --git a/packages/scope-manager/src/lib/esnext.intl.ts b/packages/scope-manager/src/lib/esnext.intl.ts index 35c7ef82ddb..03cc1fb5997 100644 --- a/packages/scope-manager/src/lib/esnext.intl.ts +++ b/packages/scope-manager/src/lib/esnext.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const esnext_intl = { diff --git a/packages/scope-manager/src/lib/esnext.promise.ts b/packages/scope-manager/src/lib/esnext.promise.ts index 08c9e142841..8042c77f8b4 100644 --- a/packages/scope-manager/src/lib/esnext.promise.ts +++ b/packages/scope-manager/src/lib/esnext.promise.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const esnext_promise = { AggregateError: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/esnext.string.ts b/packages/scope-manager/src/lib/esnext.string.ts index d0bacb659a4..354c5d6dfea 100644 --- a/packages/scope-manager/src/lib/esnext.string.ts +++ b/packages/scope-manager/src/lib/esnext.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const esnext_string = { diff --git a/packages/scope-manager/src/lib/esnext.symbol.ts b/packages/scope-manager/src/lib/esnext.symbol.ts index fb16e1cb55a..49b2a8c9cd7 100644 --- a/packages/scope-manager/src/lib/esnext.symbol.ts +++ b/packages/scope-manager/src/lib/esnext.symbol.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const esnext_symbol = { diff --git a/packages/scope-manager/src/lib/esnext.ts b/packages/scope-manager/src/lib/esnext.ts index 31ac2762267..e6c59d96cf2 100644 --- a/packages/scope-manager/src/lib/esnext.ts +++ b/packages/scope-manager/src/lib/esnext.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { es2022 } from './es2022'; import { esnext_intl } from './esnext.intl'; diff --git a/packages/scope-manager/src/lib/esnext.weakref.ts b/packages/scope-manager/src/lib/esnext.weakref.ts index 9a7df1c6d58..aec8e3070bf 100644 --- a/packages/scope-manager/src/lib/esnext.weakref.ts +++ b/packages/scope-manager/src/lib/esnext.weakref.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const esnext_weakref = { WeakRef: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/index.ts b/packages/scope-manager/src/lib/index.ts index 989857ba152..06888a64238 100644 --- a/packages/scope-manager/src/lib/index.ts +++ b/packages/scope-manager/src/lib/index.ts @@ -3,14 +3,26 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; import { es5 } from './es5'; import { es6 } from './es6'; -import { es7 } from './es7'; import { es2015 } from './es2015'; -import { es2015_collection } from './es2015.collection'; +import { es7 } from './es7'; +import { es2016 } from './es2016'; +import { es2017 } from './es2017'; +import { es2018 } from './es2018'; +import { es2019 } from './es2019'; +import { es2020 } from './es2020'; +import { es2021 } from './es2021'; +import { es2022 } from './es2022'; +import { esnext } from './esnext'; +import { dom } from './dom'; +import { dom_iterable } from './dom.iterable'; +import { webworker } from './webworker'; +import { webworker_importscripts } from './webworker.importscripts'; +import { webworker_iterable } from './webworker.iterable'; +import { scripthost } from './scripthost'; import { es2015_core } from './es2015.core'; +import { es2015_collection } from './es2015.collection'; import { es2015_generator } from './es2015.generator'; import { es2015_iterable } from './es2015.iterable'; import { es2015_promise } from './es2015.promise'; @@ -18,68 +30,57 @@ import { es2015_proxy } from './es2015.proxy'; import { es2015_reflect } from './es2015.reflect'; import { es2015_symbol } from './es2015.symbol'; import { es2015_symbol_wellknown } from './es2015.symbol.wellknown'; -import { es2016 } from './es2016'; import { es2016_array_include } from './es2016.array.include'; -import { es2016_full } from './es2016.full'; -import { es2017 } from './es2017'; -import { es2017_full } from './es2017.full'; -import { es2017_intl } from './es2017.intl'; import { es2017_object } from './es2017.object'; import { es2017_sharedmemory } from './es2017.sharedmemory'; import { es2017_string } from './es2017.string'; +import { es2017_intl } from './es2017.intl'; import { es2017_typedarrays } from './es2017.typedarrays'; -import { es2018 } from './es2018'; import { es2018_asyncgenerator } from './es2018.asyncgenerator'; import { es2018_asynciterable } from './es2018.asynciterable'; -import { es2018_full } from './es2018.full'; import { es2018_intl } from './es2018.intl'; import { es2018_promise } from './es2018.promise'; import { es2018_regexp } from './es2018.regexp'; -import { es2019 } from './es2019'; import { es2019_array } from './es2019.array'; -import { es2019_full } from './es2019.full'; import { es2019_object } from './es2019.object'; import { es2019_string } from './es2019.string'; import { es2019_symbol } from './es2019.symbol'; -import { es2020 } from './es2020'; +import { es2019_intl } from './es2019.intl'; import { es2020_bigint } from './es2020.bigint'; import { es2020_date } from './es2020.date'; -import { es2020_full } from './es2020.full'; -import { es2020_intl } from './es2020.intl'; -import { es2020_number } from './es2020.number'; import { es2020_promise } from './es2020.promise'; import { es2020_sharedmemory } from './es2020.sharedmemory'; import { es2020_string } from './es2020.string'; import { es2020_symbol_wellknown } from './es2020.symbol.wellknown'; -import { es2021 } from './es2021'; -import { es2021_full } from './es2021.full'; -import { es2021_intl } from './es2021.intl'; +import { es2020_intl } from './es2020.intl'; +import { es2020_number } from './es2020.number'; import { es2021_promise } from './es2021.promise'; import { es2021_string } from './es2021.string'; import { es2021_weakref } from './es2021.weakref'; -import { es2022 } from './es2022'; +import { es2021_intl } from './es2021.intl'; import { es2022_array } from './es2022.array'; import { es2022_error } from './es2022.error'; -import { es2022_full } from './es2022.full'; import { es2022_intl } from './es2022.intl'; import { es2022_object } from './es2022.object'; import { es2022_sharedmemory } from './es2022.sharedmemory'; import { es2022_string } from './es2022.string'; -import { esnext } from './esnext'; import { esnext_array } from './esnext.array'; +import { esnext_symbol } from './esnext.symbol'; import { esnext_asynciterable } from './esnext.asynciterable'; -import { esnext_bigint } from './esnext.bigint'; -import { esnext_full } from './esnext.full'; import { esnext_intl } from './esnext.intl'; -import { esnext_promise } from './esnext.promise'; +import { esnext_bigint } from './esnext.bigint'; import { esnext_string } from './esnext.string'; -import { esnext_symbol } from './esnext.symbol'; +import { esnext_promise } from './esnext.promise'; import { esnext_weakref } from './esnext.weakref'; +import { es2016_full } from './es2016.full'; +import { es2017_full } from './es2017.full'; +import { es2018_full } from './es2018.full'; +import { es2019_full } from './es2019.full'; +import { es2020_full } from './es2020.full'; +import { es2021_full } from './es2021.full'; +import { es2022_full } from './es2022.full'; +import { esnext_full } from './esnext.full'; import { lib as libBase } from './lib'; -import { scripthost } from './scripthost'; -import { webworker } from './webworker'; -import { webworker_importscripts } from './webworker.importscripts'; -import { webworker_iterable } from './webworker.iterable'; const lib = { es5, @@ -124,6 +125,7 @@ const lib = { 'es2019.object': es2019_object, 'es2019.string': es2019_string, 'es2019.symbol': es2019_symbol, + 'es2019.intl': es2019_intl, 'es2020.bigint': es2020_bigint, 'es2020.date': es2020_date, 'es2020.promise': es2020_promise, diff --git a/packages/scope-manager/src/lib/lib.ts b/packages/scope-manager/src/lib/lib.ts index 4ec72e9e80b..68367da23d9 100644 --- a/packages/scope-manager/src/lib/lib.ts +++ b/packages/scope-manager/src/lib/lib.ts @@ -3,11 +3,11 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { dom } from './dom'; +import { ImplicitLibVariableOptions } from '../variable'; import { es5 } from './es5'; -import { scripthost } from './scripthost'; +import { dom } from './dom'; import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; export const lib = { ...es5, diff --git a/packages/scope-manager/src/lib/scripthost.ts b/packages/scope-manager/src/lib/scripthost.ts index cf802a3abad..c143fc8ae59 100644 --- a/packages/scope-manager/src/lib/scripthost.ts +++ b/packages/scope-manager/src/lib/scripthost.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; -import { TYPE, TYPE_VALUE } from './base-config'; +import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const scripthost = { ActiveXObject: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/webworker.importscripts.ts b/packages/scope-manager/src/lib/webworker.importscripts.ts index f7f1cb026bc..4b3bb5f95c6 100644 --- a/packages/scope-manager/src/lib/webworker.importscripts.ts +++ b/packages/scope-manager/src/lib/webworker.importscripts.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; export const webworker_importscripts = {} as Record< string, diff --git a/packages/scope-manager/src/lib/webworker.iterable.ts b/packages/scope-manager/src/lib/webworker.iterable.ts index e4b0fb8b940..80a04c759e4 100644 --- a/packages/scope-manager/src/lib/webworker.iterable.ts +++ b/packages/scope-manager/src/lib/webworker.iterable.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const webworker_iterable = { diff --git a/packages/scope-manager/src/lib/webworker.ts b/packages/scope-manager/src/lib/webworker.ts index e44ce52113c..7f800409938 100644 --- a/packages/scope-manager/src/lib/webworker.ts +++ b/packages/scope-manager/src/lib/webworker.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import type { ImplicitLibVariableOptions } from '../variable'; +import { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; export const webworker = { @@ -88,6 +88,7 @@ export const webworker = { QueuingStrategyInit: TYPE, RTCEncodedAudioFrameMetadata: TYPE, RTCEncodedVideoFrameMetadata: TYPE, + ReadableStreamGetReaderOptions: TYPE, ReadableStreamReadDoneResult: TYPE, ReadableStreamReadValueResult: TYPE, ReadableWritablePair: TYPE, @@ -108,6 +109,8 @@ export const webworker = { TextDecoderOptions: TYPE, TextEncoderEncodeIntoResult: TYPE, Transformer: TYPE, + UnderlyingByteSource: TYPE, + UnderlyingDefaultSource: TYPE, UnderlyingSink: TYPE, UnderlyingSource: TYPE, VideoColorSpaceInit: TYPE, @@ -157,6 +160,7 @@ export const webworker = { EXT_frag_depth: TYPE, EXT_sRGB: TYPE, EXT_shader_texture_lod: TYPE, + EXT_texture_compression_bptc: TYPE, EXT_texture_compression_rgtc: TYPE, EXT_texture_filter_anisotropic: TYPE, ErrorEvent: TYPE_VALUE, @@ -431,6 +435,8 @@ export const webworker = { PremultiplyAlpha: TYPE, PushEncryptionKeyName: TYPE, RTCEncodedVideoFrameType: TYPE, + ReadableStreamReaderMode: TYPE, + ReadableStreamType: TYPE, ReferrerPolicy: TYPE, RequestCache: TYPE, RequestCredentials: TYPE, diff --git a/packages/types/src/lib.ts b/packages/types/src/lib.ts index 0d92717fcb5..880bafe5b5e 100644 --- a/packages/types/src/lib.ts +++ b/packages/types/src/lib.ts @@ -46,6 +46,7 @@ type Lib = | 'es2019.object' | 'es2019.string' | 'es2019.symbol' + | 'es2019.intl' | 'es2020.bigint' | 'es2020.date' | 'es2020.promise' From 2b3bbcd4e41e22c60daab5e52cd0d5b1e0f0e4a3 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Mon, 3 Oct 2022 02:02:50 +0900 Subject: [PATCH 05/16] chore: update patch for typescript --- patches/typescript+4.9.1-beta.patch | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/patches/typescript+4.9.1-beta.patch b/patches/typescript+4.9.1-beta.patch index 574addc105f..5e742894909 100644 --- a/patches/typescript+4.9.1-beta.patch +++ b/patches/typescript+4.9.1-beta.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/typescript/lib/typescript.d.ts b/node_modules/typescript/lib/typescript.d.ts -index 0e6b255..92d7cf6 100644 +index 0e6b255..f0a588c 100644 --- a/node_modules/typescript/lib/typescript.d.ts +++ b/node_modules/typescript/lib/typescript.d.ts @@ -428,8 +428,8 @@ declare namespace ts { @@ -12,7 +12,21 @@ index 0e6b255..92d7cf6 100644 JSDocComment = 323, JSDocText = 324, JSDocTypeLiteral = 325, -@@ -4857,7 +4857,13 @@ declare namespace ts { +@@ -4395,7 +4395,13 @@ declare namespace ts { + function symbolName(symbol: Symbol): string; + function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; + function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; ++ /** ++ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getModifiers from `@typescript-eslint/type-utils`. ++ */ + function getDecorators(node: HasDecorators): readonly Decorator[] | undefined; ++ /** ++ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getDecorators from `@typescript-eslint/type-utils`. ++ */ + function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; + /** + * Gets the JSDoc parameter tags for the node if present. +@@ -4857,7 +4863,13 @@ declare namespace ts { } declare namespace ts { function setTextRange(range: T, location: TextRange | undefined): T; @@ -26,7 +40,7 @@ index 0e6b255..92d7cf6 100644 function canHaveDecorators(node: Node): node is HasDecorators; } declare namespace ts { -@@ -7951,7 +7957,7 @@ declare namespace ts { +@@ -7951,7 +7963,7 @@ declare namespace ts { * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; * ``` */ From 154f540de0c2fcd28a2e85a303d3829b8a877b77 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Mon, 3 Oct 2022 02:06:35 +0900 Subject: [PATCH 06/16] fix: run `lint-fix` --- .../scope-manager/src/lib/dom.iterable.ts | 2 +- packages/scope-manager/src/lib/dom.ts | 2 +- .../src/lib/es2015.collection.ts | 4 +- packages/scope-manager/src/lib/es2015.core.ts | 2 +- .../scope-manager/src/lib/es2015.generator.ts | 4 +- .../scope-manager/src/lib/es2015.iterable.ts | 4 +- .../scope-manager/src/lib/es2015.promise.ts | 2 +- .../scope-manager/src/lib/es2015.proxy.ts | 2 +- .../scope-manager/src/lib/es2015.reflect.ts | 2 +- .../scope-manager/src/lib/es2015.symbol.ts | 2 +- .../src/lib/es2015.symbol.wellknown.ts | 4 +- packages/scope-manager/src/lib/es2015.ts | 6 +- .../src/lib/es2016.array.include.ts | 2 +- packages/scope-manager/src/lib/es2016.full.ts | 8 +-- packages/scope-manager/src/lib/es2016.ts | 2 +- packages/scope-manager/src/lib/es2017.full.ts | 8 +-- packages/scope-manager/src/lib/es2017.intl.ts | 2 +- .../scope-manager/src/lib/es2017.object.ts | 2 +- .../src/lib/es2017.sharedmemory.ts | 4 +- .../scope-manager/src/lib/es2017.string.ts | 2 +- packages/scope-manager/src/lib/es2017.ts | 4 +- .../src/lib/es2017.typedarrays.ts | 2 +- .../src/lib/es2018.asyncgenerator.ts | 4 +- .../src/lib/es2018.asynciterable.ts | 6 +- packages/scope-manager/src/lib/es2018.full.ts | 8 +-- packages/scope-manager/src/lib/es2018.intl.ts | 2 +- .../scope-manager/src/lib/es2018.promise.ts | 2 +- .../scope-manager/src/lib/es2018.regexp.ts | 2 +- packages/scope-manager/src/lib/es2018.ts | 6 +- .../scope-manager/src/lib/es2019.array.ts | 2 +- packages/scope-manager/src/lib/es2019.full.ts | 8 +-- packages/scope-manager/src/lib/es2019.intl.ts | 2 +- .../scope-manager/src/lib/es2019.object.ts | 4 +- .../scope-manager/src/lib/es2019.string.ts | 2 +- .../scope-manager/src/lib/es2019.symbol.ts | 2 +- packages/scope-manager/src/lib/es2019.ts | 4 +- .../scope-manager/src/lib/es2020.bigint.ts | 4 +- packages/scope-manager/src/lib/es2020.date.ts | 4 +- packages/scope-manager/src/lib/es2020.full.ts | 8 +-- packages/scope-manager/src/lib/es2020.intl.ts | 4 +- .../scope-manager/src/lib/es2020.number.ts | 4 +- .../scope-manager/src/lib/es2020.promise.ts | 2 +- .../src/lib/es2020.sharedmemory.ts | 2 +- .../scope-manager/src/lib/es2020.string.ts | 4 +- .../src/lib/es2020.symbol.wellknown.ts | 4 +- packages/scope-manager/src/lib/es2020.ts | 4 +- packages/scope-manager/src/lib/es2021.full.ts | 8 +-- packages/scope-manager/src/lib/es2021.intl.ts | 2 +- .../scope-manager/src/lib/es2021.promise.ts | 4 +- .../scope-manager/src/lib/es2021.string.ts | 2 +- packages/scope-manager/src/lib/es2021.ts | 4 +- .../scope-manager/src/lib/es2021.weakref.ts | 4 +- .../scope-manager/src/lib/es2022.array.ts | 2 +- .../scope-manager/src/lib/es2022.error.ts | 2 +- packages/scope-manager/src/lib/es2022.full.ts | 8 +-- packages/scope-manager/src/lib/es2022.intl.ts | 2 +- .../scope-manager/src/lib/es2022.object.ts | 2 +- .../src/lib/es2022.sharedmemory.ts | 2 +- .../scope-manager/src/lib/es2022.string.ts | 2 +- packages/scope-manager/src/lib/es2022.ts | 2 +- packages/scope-manager/src/lib/es5.ts | 2 +- packages/scope-manager/src/lib/es6.ts | 6 +- packages/scope-manager/src/lib/es7.ts | 2 +- .../scope-manager/src/lib/esnext.array.ts | 2 +- .../src/lib/esnext.asynciterable.ts | 6 +- .../scope-manager/src/lib/esnext.bigint.ts | 4 +- packages/scope-manager/src/lib/esnext.full.ts | 8 +-- packages/scope-manager/src/lib/esnext.intl.ts | 2 +- .../scope-manager/src/lib/esnext.promise.ts | 4 +- .../scope-manager/src/lib/esnext.string.ts | 2 +- .../scope-manager/src/lib/esnext.symbol.ts | 2 +- packages/scope-manager/src/lib/esnext.ts | 2 +- .../scope-manager/src/lib/esnext.weakref.ts | 4 +- packages/scope-manager/src/lib/index.ts | 64 +++++++++---------- packages/scope-manager/src/lib/lib.ts | 6 +- packages/scope-manager/src/lib/scripthost.ts | 4 +- .../src/lib/webworker.importscripts.ts | 2 +- .../src/lib/webworker.iterable.ts | 2 +- packages/scope-manager/src/lib/webworker.ts | 2 +- .../src/referencer/Referencer.ts | 2 +- 80 files changed, 170 insertions(+), 170 deletions(-) diff --git a/packages/scope-manager/src/lib/dom.iterable.ts b/packages/scope-manager/src/lib/dom.iterable.ts index 225c4f28b84..d294d684ddc 100644 --- a/packages/scope-manager/src/lib/dom.iterable.ts +++ b/packages/scope-manager/src/lib/dom.iterable.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const dom_iterable = { diff --git a/packages/scope-manager/src/lib/dom.ts b/packages/scope-manager/src/lib/dom.ts index 311dbe1db7e..d13afa2b57b 100644 --- a/packages/scope-manager/src/lib/dom.ts +++ b/packages/scope-manager/src/lib/dom.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; export const dom = { diff --git a/packages/scope-manager/src/lib/es2015.collection.ts b/packages/scope-manager/src/lib/es2015.collection.ts index 98933f1c1fd..51386ebcc74 100644 --- a/packages/scope-manager/src/lib/es2015.collection.ts +++ b/packages/scope-manager/src/lib/es2015.collection.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { TYPE_VALUE, TYPE } from './base-config'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const es2015_collection = { Map: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/es2015.core.ts b/packages/scope-manager/src/lib/es2015.core.ts index ba44cf290b4..f9475d7db1d 100644 --- a/packages/scope-manager/src/lib/es2015.core.ts +++ b/packages/scope-manager/src/lib/es2015.core.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_core = { diff --git a/packages/scope-manager/src/lib/es2015.generator.ts b/packages/scope-manager/src/lib/es2015.generator.ts index f5dce9611ae..90d26e1ea0d 100644 --- a/packages/scope-manager/src/lib/es2015.generator.ts +++ b/packages/scope-manager/src/lib/es2015.generator.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2015_iterable } from './es2015.iterable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2015_iterable } from './es2015.iterable'; export const es2015_generator = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2015.iterable.ts b/packages/scope-manager/src/lib/es2015.iterable.ts index d27ab2efcc6..2ab60a44b84 100644 --- a/packages/scope-manager/src/lib/es2015.iterable.ts +++ b/packages/scope-manager/src/lib/es2015.iterable.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2015_symbol } from './es2015.symbol'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2015_symbol } from './es2015.symbol'; export const es2015_iterable = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2015.promise.ts b/packages/scope-manager/src/lib/es2015.promise.ts index 1334b2abca4..a3896e0f46f 100644 --- a/packages/scope-manager/src/lib/es2015.promise.ts +++ b/packages/scope-manager/src/lib/es2015.promise.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_promise = { diff --git a/packages/scope-manager/src/lib/es2015.proxy.ts b/packages/scope-manager/src/lib/es2015.proxy.ts index d2c0d9b6616..2dbc6e22263 100644 --- a/packages/scope-manager/src/lib/es2015.proxy.ts +++ b/packages/scope-manager/src/lib/es2015.proxy.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_proxy = { diff --git a/packages/scope-manager/src/lib/es2015.reflect.ts b/packages/scope-manager/src/lib/es2015.reflect.ts index 4a71e4b9def..dcc2a5d910b 100644 --- a/packages/scope-manager/src/lib/es2015.reflect.ts +++ b/packages/scope-manager/src/lib/es2015.reflect.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2015_reflect = { diff --git a/packages/scope-manager/src/lib/es2015.symbol.ts b/packages/scope-manager/src/lib/es2015.symbol.ts index c027cae3b38..eef09036f87 100644 --- a/packages/scope-manager/src/lib/es2015.symbol.ts +++ b/packages/scope-manager/src/lib/es2015.symbol.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2015_symbol = { diff --git a/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts b/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts index 16d88e5ca57..94fd4ac4e70 100644 --- a/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts +++ b/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2015_symbol } from './es2015.symbol'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2015_symbol } from './es2015.symbol'; export const es2015_symbol_wellknown = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2015.ts b/packages/scope-manager/src/lib/es2015.ts index 9e225bddb33..f6a8aa8ab73 100644 --- a/packages/scope-manager/src/lib/es2015.ts +++ b/packages/scope-manager/src/lib/es2015.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es5 } from './es5'; -import { es2015_core } from './es2015.core'; import { es2015_collection } from './es2015.collection'; -import { es2015_iterable } from './es2015.iterable'; +import { es2015_core } from './es2015.core'; import { es2015_generator } from './es2015.generator'; +import { es2015_iterable } from './es2015.iterable'; import { es2015_promise } from './es2015.promise'; import { es2015_proxy } from './es2015.proxy'; import { es2015_reflect } from './es2015.reflect'; diff --git a/packages/scope-manager/src/lib/es2016.array.include.ts b/packages/scope-manager/src/lib/es2016.array.include.ts index 7cab0a4c84d..17c927bd467 100644 --- a/packages/scope-manager/src/lib/es2016.array.include.ts +++ b/packages/scope-manager/src/lib/es2016.array.include.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2016_array_include = { diff --git a/packages/scope-manager/src/lib/es2016.full.ts b/packages/scope-manager/src/lib/es2016.full.ts index cfc4632c7da..e7fb9802cb7 100644 --- a/packages/scope-manager/src/lib/es2016.full.ts +++ b/packages/scope-manager/src/lib/es2016.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2016 } from './es2016'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { es2016 } from './es2016'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const es2016_full = { ...es2016, diff --git a/packages/scope-manager/src/lib/es2016.ts b/packages/scope-manager/src/lib/es2016.ts index f4ac61374c3..f00abac6c4f 100644 --- a/packages/scope-manager/src/lib/es2016.ts +++ b/packages/scope-manager/src/lib/es2016.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2015 } from './es2015'; import { es2016_array_include } from './es2016.array.include'; diff --git a/packages/scope-manager/src/lib/es2017.full.ts b/packages/scope-manager/src/lib/es2017.full.ts index 26d2c2b1f8c..a1d8c386bb4 100644 --- a/packages/scope-manager/src/lib/es2017.full.ts +++ b/packages/scope-manager/src/lib/es2017.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2017 } from './es2017'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { es2017 } from './es2017'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const es2017_full = { ...es2017, diff --git a/packages/scope-manager/src/lib/es2017.intl.ts b/packages/scope-manager/src/lib/es2017.intl.ts index 48e7fe21715..b8f1325672e 100644 --- a/packages/scope-manager/src/lib/es2017.intl.ts +++ b/packages/scope-manager/src/lib/es2017.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2017_intl = { diff --git a/packages/scope-manager/src/lib/es2017.object.ts b/packages/scope-manager/src/lib/es2017.object.ts index 17344ec6591..66bea4e7d3f 100644 --- a/packages/scope-manager/src/lib/es2017.object.ts +++ b/packages/scope-manager/src/lib/es2017.object.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2017_object = { diff --git a/packages/scope-manager/src/lib/es2017.sharedmemory.ts b/packages/scope-manager/src/lib/es2017.sharedmemory.ts index d5f3c8970b2..998d41493fd 100644 --- a/packages/scope-manager/src/lib/es2017.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2017.sharedmemory.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; import { es2015_symbol } from './es2015.symbol'; import { es2015_symbol_wellknown } from './es2015.symbol.wellknown'; -import { TYPE_VALUE, TYPE } from './base-config'; export const es2017_sharedmemory = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2017.string.ts b/packages/scope-manager/src/lib/es2017.string.ts index 8ca832f3cf8..64ec52f3074 100644 --- a/packages/scope-manager/src/lib/es2017.string.ts +++ b/packages/scope-manager/src/lib/es2017.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2017_string = { diff --git a/packages/scope-manager/src/lib/es2017.ts b/packages/scope-manager/src/lib/es2017.ts index c28a0b45236..3cbafd35b16 100644 --- a/packages/scope-manager/src/lib/es2017.ts +++ b/packages/scope-manager/src/lib/es2017.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2016 } from './es2016'; +import { es2017_intl } from './es2017.intl'; import { es2017_object } from './es2017.object'; import { es2017_sharedmemory } from './es2017.sharedmemory'; import { es2017_string } from './es2017.string'; -import { es2017_intl } from './es2017.intl'; import { es2017_typedarrays } from './es2017.typedarrays'; export const es2017 = { diff --git a/packages/scope-manager/src/lib/es2017.typedarrays.ts b/packages/scope-manager/src/lib/es2017.typedarrays.ts index 0c9a43160b8..8fdb9a96281 100644 --- a/packages/scope-manager/src/lib/es2017.typedarrays.ts +++ b/packages/scope-manager/src/lib/es2017.typedarrays.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2017_typedarrays = { diff --git a/packages/scope-manager/src/lib/es2018.asyncgenerator.ts b/packages/scope-manager/src/lib/es2018.asyncgenerator.ts index 68f67bd6483..5af8bd0a663 100644 --- a/packages/scope-manager/src/lib/es2018.asyncgenerator.ts +++ b/packages/scope-manager/src/lib/es2018.asyncgenerator.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2018_asynciterable } from './es2018.asynciterable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2018_asynciterable } from './es2018.asynciterable'; export const es2018_asyncgenerator = { ...es2018_asynciterable, diff --git a/packages/scope-manager/src/lib/es2018.asynciterable.ts b/packages/scope-manager/src/lib/es2018.asynciterable.ts index ce4aebafb0d..5d4e373ef76 100644 --- a/packages/scope-manager/src/lib/es2018.asynciterable.ts +++ b/packages/scope-manager/src/lib/es2018.asynciterable.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2015_symbol } from './es2015.symbol'; -import { es2015_iterable } from './es2015.iterable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2015_iterable } from './es2015.iterable'; +import { es2015_symbol } from './es2015.symbol'; export const es2018_asynciterable = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/es2018.full.ts b/packages/scope-manager/src/lib/es2018.full.ts index 8e0ab3621f2..802e30c6659 100644 --- a/packages/scope-manager/src/lib/es2018.full.ts +++ b/packages/scope-manager/src/lib/es2018.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2018 } from './es2018'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { es2018 } from './es2018'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const es2018_full = { ...es2018, diff --git a/packages/scope-manager/src/lib/es2018.intl.ts b/packages/scope-manager/src/lib/es2018.intl.ts index 8496761b2d2..9736c0ba48a 100644 --- a/packages/scope-manager/src/lib/es2018.intl.ts +++ b/packages/scope-manager/src/lib/es2018.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2018_intl = { diff --git a/packages/scope-manager/src/lib/es2018.promise.ts b/packages/scope-manager/src/lib/es2018.promise.ts index cc74f3b02b8..ac1e02d8a05 100644 --- a/packages/scope-manager/src/lib/es2018.promise.ts +++ b/packages/scope-manager/src/lib/es2018.promise.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2018_promise = { diff --git a/packages/scope-manager/src/lib/es2018.regexp.ts b/packages/scope-manager/src/lib/es2018.regexp.ts index 7c1ca120117..0fdf10f793a 100644 --- a/packages/scope-manager/src/lib/es2018.regexp.ts +++ b/packages/scope-manager/src/lib/es2018.regexp.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2018_regexp = { diff --git a/packages/scope-manager/src/lib/es2018.ts b/packages/scope-manager/src/lib/es2018.ts index a3b3fbe508c..d79390a3b87 100644 --- a/packages/scope-manager/src/lib/es2018.ts +++ b/packages/scope-manager/src/lib/es2018.ts @@ -3,13 +3,13 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2017 } from './es2017'; -import { es2018_asynciterable } from './es2018.asynciterable'; import { es2018_asyncgenerator } from './es2018.asyncgenerator'; +import { es2018_asynciterable } from './es2018.asynciterable'; +import { es2018_intl } from './es2018.intl'; import { es2018_promise } from './es2018.promise'; import { es2018_regexp } from './es2018.regexp'; -import { es2018_intl } from './es2018.intl'; export const es2018 = { ...es2017, diff --git a/packages/scope-manager/src/lib/es2019.array.ts b/packages/scope-manager/src/lib/es2019.array.ts index 6d814131f52..b682bb04457 100644 --- a/packages/scope-manager/src/lib/es2019.array.ts +++ b/packages/scope-manager/src/lib/es2019.array.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2019_array = { diff --git a/packages/scope-manager/src/lib/es2019.full.ts b/packages/scope-manager/src/lib/es2019.full.ts index a97c713f5a0..8cee3178bc6 100644 --- a/packages/scope-manager/src/lib/es2019.full.ts +++ b/packages/scope-manager/src/lib/es2019.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2019 } from './es2019'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { es2019 } from './es2019'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const es2019_full = { ...es2019, diff --git a/packages/scope-manager/src/lib/es2019.intl.ts b/packages/scope-manager/src/lib/es2019.intl.ts index 8e44ef6d0cd..64b46f40ebb 100644 --- a/packages/scope-manager/src/lib/es2019.intl.ts +++ b/packages/scope-manager/src/lib/es2019.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2019_intl = { diff --git a/packages/scope-manager/src/lib/es2019.object.ts b/packages/scope-manager/src/lib/es2019.object.ts index 87f3bb33f45..f1f113ed54d 100644 --- a/packages/scope-manager/src/lib/es2019.object.ts +++ b/packages/scope-manager/src/lib/es2019.object.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2015_iterable } from './es2015.iterable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2015_iterable } from './es2015.iterable'; export const es2019_object = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2019.string.ts b/packages/scope-manager/src/lib/es2019.string.ts index af1f1f8f2b5..eae2a44d376 100644 --- a/packages/scope-manager/src/lib/es2019.string.ts +++ b/packages/scope-manager/src/lib/es2019.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2019_string = { diff --git a/packages/scope-manager/src/lib/es2019.symbol.ts b/packages/scope-manager/src/lib/es2019.symbol.ts index 5c8a1fd2894..b39b41add7a 100644 --- a/packages/scope-manager/src/lib/es2019.symbol.ts +++ b/packages/scope-manager/src/lib/es2019.symbol.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2019_symbol = { diff --git a/packages/scope-manager/src/lib/es2019.ts b/packages/scope-manager/src/lib/es2019.ts index e41e53c1524..cd6d33c1f5d 100644 --- a/packages/scope-manager/src/lib/es2019.ts +++ b/packages/scope-manager/src/lib/es2019.ts @@ -3,13 +3,13 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2018 } from './es2018'; import { es2019_array } from './es2019.array'; +import { es2019_intl } from './es2019.intl'; import { es2019_object } from './es2019.object'; import { es2019_string } from './es2019.string'; import { es2019_symbol } from './es2019.symbol'; -import { es2019_intl } from './es2019.intl'; export const es2019 = { ...es2018, diff --git a/packages/scope-manager/src/lib/es2020.bigint.ts b/packages/scope-manager/src/lib/es2020.bigint.ts index 3444dc701a2..52fbba1ca2e 100644 --- a/packages/scope-manager/src/lib/es2020.bigint.ts +++ b/packages/scope-manager/src/lib/es2020.bigint.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2020_intl } from './es2020.intl'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; +import { es2020_intl } from './es2020.intl'; export const es2020_bigint = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/es2020.date.ts b/packages/scope-manager/src/lib/es2020.date.ts index 1a5ed0d23f3..b4c3d319deb 100644 --- a/packages/scope-manager/src/lib/es2020.date.ts +++ b/packages/scope-manager/src/lib/es2020.date.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2020_intl } from './es2020.intl'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2020_intl } from './es2020.intl'; export const es2020_date = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/es2020.full.ts b/packages/scope-manager/src/lib/es2020.full.ts index 6467ba7818d..1de20eaecc4 100644 --- a/packages/scope-manager/src/lib/es2020.full.ts +++ b/packages/scope-manager/src/lib/es2020.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2020 } from './es2020'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { es2020 } from './es2020'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const es2020_full = { ...es2020, diff --git a/packages/scope-manager/src/lib/es2020.intl.ts b/packages/scope-manager/src/lib/es2020.intl.ts index 6cf997c0ca3..2866dde791e 100644 --- a/packages/scope-manager/src/lib/es2020.intl.ts +++ b/packages/scope-manager/src/lib/es2020.intl.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2018_intl } from './es2018.intl'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; +import { es2018_intl } from './es2018.intl'; export const es2020_intl = { ...es2018_intl, diff --git a/packages/scope-manager/src/lib/es2020.number.ts b/packages/scope-manager/src/lib/es2020.number.ts index 04ba01bc4bf..445b6073364 100644 --- a/packages/scope-manager/src/lib/es2020.number.ts +++ b/packages/scope-manager/src/lib/es2020.number.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2020_intl } from './es2020.intl'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2020_intl } from './es2020.intl'; export const es2020_number = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/es2020.promise.ts b/packages/scope-manager/src/lib/es2020.promise.ts index c875a4c7b31..0352586806d 100644 --- a/packages/scope-manager/src/lib/es2020.promise.ts +++ b/packages/scope-manager/src/lib/es2020.promise.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2020_promise = { diff --git a/packages/scope-manager/src/lib/es2020.sharedmemory.ts b/packages/scope-manager/src/lib/es2020.sharedmemory.ts index e927965e621..180e291c0cc 100644 --- a/packages/scope-manager/src/lib/es2020.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2020.sharedmemory.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2020_sharedmemory = { diff --git a/packages/scope-manager/src/lib/es2020.string.ts b/packages/scope-manager/src/lib/es2020.string.ts index c33be91dd3f..ef0a81e1ca8 100644 --- a/packages/scope-manager/src/lib/es2020.string.ts +++ b/packages/scope-manager/src/lib/es2020.string.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2015_iterable } from './es2015.iterable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2015_iterable } from './es2015.iterable'; export const es2020_string = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts b/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts index db8d79e9f44..1e104700032 100644 --- a/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts +++ b/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; import { es2015_iterable } from './es2015.iterable'; import { es2015_symbol } from './es2015.symbol'; -import { TYPE } from './base-config'; export const es2020_symbol_wellknown = { ...es2015_iterable, diff --git a/packages/scope-manager/src/lib/es2020.ts b/packages/scope-manager/src/lib/es2020.ts index 3a89464f456..c6b1140596b 100644 --- a/packages/scope-manager/src/lib/es2020.ts +++ b/packages/scope-manager/src/lib/es2020.ts @@ -3,16 +3,16 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2019 } from './es2019'; import { es2020_bigint } from './es2020.bigint'; import { es2020_date } from './es2020.date'; +import { es2020_intl } from './es2020.intl'; import { es2020_number } from './es2020.number'; import { es2020_promise } from './es2020.promise'; import { es2020_sharedmemory } from './es2020.sharedmemory'; import { es2020_string } from './es2020.string'; import { es2020_symbol_wellknown } from './es2020.symbol.wellknown'; -import { es2020_intl } from './es2020.intl'; export const es2020 = { ...es2019, diff --git a/packages/scope-manager/src/lib/es2021.full.ts b/packages/scope-manager/src/lib/es2021.full.ts index 2bf87c06e1a..e45a862ff2b 100644 --- a/packages/scope-manager/src/lib/es2021.full.ts +++ b/packages/scope-manager/src/lib/es2021.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2021 } from './es2021'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { es2021 } from './es2021'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const es2021_full = { ...es2021, diff --git a/packages/scope-manager/src/lib/es2021.intl.ts b/packages/scope-manager/src/lib/es2021.intl.ts index f73cbe394ab..e8cebf8ed07 100644 --- a/packages/scope-manager/src/lib/es2021.intl.ts +++ b/packages/scope-manager/src/lib/es2021.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2021_intl = { diff --git a/packages/scope-manager/src/lib/es2021.promise.ts b/packages/scope-manager/src/lib/es2021.promise.ts index 3607632e743..20d1f1b313c 100644 --- a/packages/scope-manager/src/lib/es2021.promise.ts +++ b/packages/scope-manager/src/lib/es2021.promise.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { TYPE_VALUE, TYPE } from './base-config'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const es2021_promise = { AggregateError: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/es2021.string.ts b/packages/scope-manager/src/lib/es2021.string.ts index 28e9af00f37..8b7aa25c5a5 100644 --- a/packages/scope-manager/src/lib/es2021.string.ts +++ b/packages/scope-manager/src/lib/es2021.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2021_string = { diff --git a/packages/scope-manager/src/lib/es2021.ts b/packages/scope-manager/src/lib/es2021.ts index 43fd33f9abe..c54cfc31ccb 100644 --- a/packages/scope-manager/src/lib/es2021.ts +++ b/packages/scope-manager/src/lib/es2021.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2020 } from './es2020'; +import { es2021_intl } from './es2021.intl'; import { es2021_promise } from './es2021.promise'; import { es2021_string } from './es2021.string'; import { es2021_weakref } from './es2021.weakref'; -import { es2021_intl } from './es2021.intl'; export const es2021 = { ...es2020, diff --git a/packages/scope-manager/src/lib/es2021.weakref.ts b/packages/scope-manager/src/lib/es2021.weakref.ts index 4a7ee2ea44c..a65c90a8058 100644 --- a/packages/scope-manager/src/lib/es2021.weakref.ts +++ b/packages/scope-manager/src/lib/es2021.weakref.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { TYPE_VALUE, TYPE } from './base-config'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const es2021_weakref = { WeakRef: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/es2022.array.ts b/packages/scope-manager/src/lib/es2022.array.ts index 95785becd3d..3927f26851e 100644 --- a/packages/scope-manager/src/lib/es2022.array.ts +++ b/packages/scope-manager/src/lib/es2022.array.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_array = { diff --git a/packages/scope-manager/src/lib/es2022.error.ts b/packages/scope-manager/src/lib/es2022.error.ts index f1e1bc2fa0f..282f66648bb 100644 --- a/packages/scope-manager/src/lib/es2022.error.ts +++ b/packages/scope-manager/src/lib/es2022.error.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_error = { diff --git a/packages/scope-manager/src/lib/es2022.full.ts b/packages/scope-manager/src/lib/es2022.full.ts index 3ef0dd62eca..1cf84cd17eb 100644 --- a/packages/scope-manager/src/lib/es2022.full.ts +++ b/packages/scope-manager/src/lib/es2022.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2022 } from './es2022'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { es2022 } from './es2022'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const es2022_full = { ...es2022, diff --git a/packages/scope-manager/src/lib/es2022.intl.ts b/packages/scope-manager/src/lib/es2022.intl.ts index f91ef8640a0..22c7fc5694d 100644 --- a/packages/scope-manager/src/lib/es2022.intl.ts +++ b/packages/scope-manager/src/lib/es2022.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const es2022_intl = { diff --git a/packages/scope-manager/src/lib/es2022.object.ts b/packages/scope-manager/src/lib/es2022.object.ts index 650a01c3835..ea209894d13 100644 --- a/packages/scope-manager/src/lib/es2022.object.ts +++ b/packages/scope-manager/src/lib/es2022.object.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_object = { diff --git a/packages/scope-manager/src/lib/es2022.sharedmemory.ts b/packages/scope-manager/src/lib/es2022.sharedmemory.ts index 8efb4b9d8c9..24d82d60912 100644 --- a/packages/scope-manager/src/lib/es2022.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2022.sharedmemory.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_sharedmemory = { diff --git a/packages/scope-manager/src/lib/es2022.string.ts b/packages/scope-manager/src/lib/es2022.string.ts index 3c4e1a766cd..8cd490c9bc5 100644 --- a/packages/scope-manager/src/lib/es2022.string.ts +++ b/packages/scope-manager/src/lib/es2022.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const es2022_string = { diff --git a/packages/scope-manager/src/lib/es2022.ts b/packages/scope-manager/src/lib/es2022.ts index 6f23b9dcd57..0956c0111d6 100644 --- a/packages/scope-manager/src/lib/es2022.ts +++ b/packages/scope-manager/src/lib/es2022.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2021 } from './es2021'; import { es2022_array } from './es2022.array'; import { es2022_error } from './es2022.error'; diff --git a/packages/scope-manager/src/lib/es5.ts b/packages/scope-manager/src/lib/es5.ts index 888faf61520..cef8eb253ce 100644 --- a/packages/scope-manager/src/lib/es5.ts +++ b/packages/scope-manager/src/lib/es5.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; export const es5 = { diff --git a/packages/scope-manager/src/lib/es6.ts b/packages/scope-manager/src/lib/es6.ts index 57c3eca6234..12bf80e84c9 100644 --- a/packages/scope-manager/src/lib/es6.ts +++ b/packages/scope-manager/src/lib/es6.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es5 } from './es5'; -import { es2015_core } from './es2015.core'; import { es2015_collection } from './es2015.collection'; -import { es2015_iterable } from './es2015.iterable'; +import { es2015_core } from './es2015.core'; import { es2015_generator } from './es2015.generator'; +import { es2015_iterable } from './es2015.iterable'; import { es2015_promise } from './es2015.promise'; import { es2015_proxy } from './es2015.proxy'; import { es2015_reflect } from './es2015.reflect'; diff --git a/packages/scope-manager/src/lib/es7.ts b/packages/scope-manager/src/lib/es7.ts index dd0ae5bef60..e79a1dd39c7 100644 --- a/packages/scope-manager/src/lib/es7.ts +++ b/packages/scope-manager/src/lib/es7.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2015 } from './es2015'; import { es2016_array_include } from './es2016.array.include'; diff --git a/packages/scope-manager/src/lib/esnext.array.ts b/packages/scope-manager/src/lib/esnext.array.ts index 87709c583e4..e7d9824cf8c 100644 --- a/packages/scope-manager/src/lib/esnext.array.ts +++ b/packages/scope-manager/src/lib/esnext.array.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const esnext_array = { diff --git a/packages/scope-manager/src/lib/esnext.asynciterable.ts b/packages/scope-manager/src/lib/esnext.asynciterable.ts index 22c97a07040..2479b150904 100644 --- a/packages/scope-manager/src/lib/esnext.asynciterable.ts +++ b/packages/scope-manager/src/lib/esnext.asynciterable.ts @@ -3,10 +3,10 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2015_symbol } from './es2015.symbol'; -import { es2015_iterable } from './es2015.iterable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; +import { es2015_iterable } from './es2015.iterable'; +import { es2015_symbol } from './es2015.symbol'; export const esnext_asynciterable = { ...es2015_symbol, diff --git a/packages/scope-manager/src/lib/esnext.bigint.ts b/packages/scope-manager/src/lib/esnext.bigint.ts index 079bc59bf87..ccd2ae93293 100644 --- a/packages/scope-manager/src/lib/esnext.bigint.ts +++ b/packages/scope-manager/src/lib/esnext.bigint.ts @@ -3,9 +3,9 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es2020_intl } from './es2020.intl'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; +import { es2020_intl } from './es2020.intl'; export const esnext_bigint = { ...es2020_intl, diff --git a/packages/scope-manager/src/lib/esnext.full.ts b/packages/scope-manager/src/lib/esnext.full.ts index 5d7b43c2b66..2bae36c386e 100644 --- a/packages/scope-manager/src/lib/esnext.full.ts +++ b/packages/scope-manager/src/lib/esnext.full.ts @@ -3,12 +3,12 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { esnext } from './esnext'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; -import { scripthost } from './scripthost'; import { dom_iterable } from './dom.iterable'; +import { esnext } from './esnext'; +import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const esnext_full = { ...esnext, diff --git a/packages/scope-manager/src/lib/esnext.intl.ts b/packages/scope-manager/src/lib/esnext.intl.ts index 03cc1fb5997..35c7ef82ddb 100644 --- a/packages/scope-manager/src/lib/esnext.intl.ts +++ b/packages/scope-manager/src/lib/esnext.intl.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE_VALUE } from './base-config'; export const esnext_intl = { diff --git a/packages/scope-manager/src/lib/esnext.promise.ts b/packages/scope-manager/src/lib/esnext.promise.ts index 8042c77f8b4..08c9e142841 100644 --- a/packages/scope-manager/src/lib/esnext.promise.ts +++ b/packages/scope-manager/src/lib/esnext.promise.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { TYPE_VALUE, TYPE } from './base-config'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const esnext_promise = { AggregateError: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/esnext.string.ts b/packages/scope-manager/src/lib/esnext.string.ts index 354c5d6dfea..d0bacb659a4 100644 --- a/packages/scope-manager/src/lib/esnext.string.ts +++ b/packages/scope-manager/src/lib/esnext.string.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const esnext_string = { diff --git a/packages/scope-manager/src/lib/esnext.symbol.ts b/packages/scope-manager/src/lib/esnext.symbol.ts index 49b2a8c9cd7..fb16e1cb55a 100644 --- a/packages/scope-manager/src/lib/esnext.symbol.ts +++ b/packages/scope-manager/src/lib/esnext.symbol.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const esnext_symbol = { diff --git a/packages/scope-manager/src/lib/esnext.ts b/packages/scope-manager/src/lib/esnext.ts index e6c59d96cf2..31ac2762267 100644 --- a/packages/scope-manager/src/lib/esnext.ts +++ b/packages/scope-manager/src/lib/esnext.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { es2022 } from './es2022'; import { esnext_intl } from './esnext.intl'; diff --git a/packages/scope-manager/src/lib/esnext.weakref.ts b/packages/scope-manager/src/lib/esnext.weakref.ts index aec8e3070bf..9a7df1c6d58 100644 --- a/packages/scope-manager/src/lib/esnext.weakref.ts +++ b/packages/scope-manager/src/lib/esnext.weakref.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { TYPE_VALUE, TYPE } from './base-config'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const esnext_weakref = { WeakRef: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/index.ts b/packages/scope-manager/src/lib/index.ts index 06888a64238..dfee880fa16 100644 --- a/packages/scope-manager/src/lib/index.ts +++ b/packages/scope-manager/src/lib/index.ts @@ -3,26 +3,14 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager +import { dom } from './dom'; +import { dom_iterable } from './dom.iterable'; import { es5 } from './es5'; import { es6 } from './es6'; -import { es2015 } from './es2015'; import { es7 } from './es7'; -import { es2016 } from './es2016'; -import { es2017 } from './es2017'; -import { es2018 } from './es2018'; -import { es2019 } from './es2019'; -import { es2020 } from './es2020'; -import { es2021 } from './es2021'; -import { es2022 } from './es2022'; -import { esnext } from './esnext'; -import { dom } from './dom'; -import { dom_iterable } from './dom.iterable'; -import { webworker } from './webworker'; -import { webworker_importscripts } from './webworker.importscripts'; -import { webworker_iterable } from './webworker.iterable'; -import { scripthost } from './scripthost'; -import { es2015_core } from './es2015.core'; +import { es2015 } from './es2015'; import { es2015_collection } from './es2015.collection'; +import { es2015_core } from './es2015.core'; import { es2015_generator } from './es2015.generator'; import { es2015_iterable } from './es2015.iterable'; import { es2015_promise } from './es2015.promise'; @@ -30,57 +18,69 @@ import { es2015_proxy } from './es2015.proxy'; import { es2015_reflect } from './es2015.reflect'; import { es2015_symbol } from './es2015.symbol'; import { es2015_symbol_wellknown } from './es2015.symbol.wellknown'; +import { es2016 } from './es2016'; import { es2016_array_include } from './es2016.array.include'; +import { es2016_full } from './es2016.full'; +import { es2017 } from './es2017'; +import { es2017_full } from './es2017.full'; +import { es2017_intl } from './es2017.intl'; import { es2017_object } from './es2017.object'; import { es2017_sharedmemory } from './es2017.sharedmemory'; import { es2017_string } from './es2017.string'; -import { es2017_intl } from './es2017.intl'; import { es2017_typedarrays } from './es2017.typedarrays'; +import { es2018 } from './es2018'; import { es2018_asyncgenerator } from './es2018.asyncgenerator'; import { es2018_asynciterable } from './es2018.asynciterable'; +import { es2018_full } from './es2018.full'; import { es2018_intl } from './es2018.intl'; import { es2018_promise } from './es2018.promise'; import { es2018_regexp } from './es2018.regexp'; +import { es2019 } from './es2019'; import { es2019_array } from './es2019.array'; +import { es2019_full } from './es2019.full'; +import { es2019_intl } from './es2019.intl'; import { es2019_object } from './es2019.object'; import { es2019_string } from './es2019.string'; import { es2019_symbol } from './es2019.symbol'; -import { es2019_intl } from './es2019.intl'; +import { es2020 } from './es2020'; import { es2020_bigint } from './es2020.bigint'; import { es2020_date } from './es2020.date'; +import { es2020_full } from './es2020.full'; +import { es2020_intl } from './es2020.intl'; +import { es2020_number } from './es2020.number'; import { es2020_promise } from './es2020.promise'; import { es2020_sharedmemory } from './es2020.sharedmemory'; import { es2020_string } from './es2020.string'; import { es2020_symbol_wellknown } from './es2020.symbol.wellknown'; -import { es2020_intl } from './es2020.intl'; -import { es2020_number } from './es2020.number'; +import { es2021 } from './es2021'; +import { es2021_full } from './es2021.full'; +import { es2021_intl } from './es2021.intl'; import { es2021_promise } from './es2021.promise'; import { es2021_string } from './es2021.string'; import { es2021_weakref } from './es2021.weakref'; -import { es2021_intl } from './es2021.intl'; +import { es2022 } from './es2022'; import { es2022_array } from './es2022.array'; import { es2022_error } from './es2022.error'; +import { es2022_full } from './es2022.full'; import { es2022_intl } from './es2022.intl'; import { es2022_object } from './es2022.object'; import { es2022_sharedmemory } from './es2022.sharedmemory'; import { es2022_string } from './es2022.string'; +import { esnext } from './esnext'; import { esnext_array } from './esnext.array'; -import { esnext_symbol } from './esnext.symbol'; import { esnext_asynciterable } from './esnext.asynciterable'; -import { esnext_intl } from './esnext.intl'; import { esnext_bigint } from './esnext.bigint'; -import { esnext_string } from './esnext.string'; +import { esnext_full } from './esnext.full'; +import { esnext_intl } from './esnext.intl'; import { esnext_promise } from './esnext.promise'; +import { esnext_string } from './esnext.string'; +import { esnext_symbol } from './esnext.symbol'; import { esnext_weakref } from './esnext.weakref'; -import { es2016_full } from './es2016.full'; -import { es2017_full } from './es2017.full'; -import { es2018_full } from './es2018.full'; -import { es2019_full } from './es2019.full'; -import { es2020_full } from './es2020.full'; -import { es2021_full } from './es2021.full'; -import { es2022_full } from './es2022.full'; -import { esnext_full } from './esnext.full'; import { lib as libBase } from './lib'; +import { scripthost } from './scripthost'; +import { webworker } from './webworker'; +import { webworker_importscripts } from './webworker.importscripts'; +import { webworker_iterable } from './webworker.iterable'; const lib = { es5, diff --git a/packages/scope-manager/src/lib/lib.ts b/packages/scope-manager/src/lib/lib.ts index 68367da23d9..4ec72e9e80b 100644 --- a/packages/scope-manager/src/lib/lib.ts +++ b/packages/scope-manager/src/lib/lib.ts @@ -3,11 +3,11 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { es5 } from './es5'; +import type { ImplicitLibVariableOptions } from '../variable'; import { dom } from './dom'; -import { webworker_importscripts } from './webworker.importscripts'; +import { es5 } from './es5'; import { scripthost } from './scripthost'; +import { webworker_importscripts } from './webworker.importscripts'; export const lib = { ...es5, diff --git a/packages/scope-manager/src/lib/scripthost.ts b/packages/scope-manager/src/lib/scripthost.ts index c143fc8ae59..cf802a3abad 100644 --- a/packages/scope-manager/src/lib/scripthost.ts +++ b/packages/scope-manager/src/lib/scripthost.ts @@ -3,8 +3,8 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; -import { TYPE_VALUE, TYPE } from './base-config'; +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const scripthost = { ActiveXObject: TYPE_VALUE, diff --git a/packages/scope-manager/src/lib/webworker.importscripts.ts b/packages/scope-manager/src/lib/webworker.importscripts.ts index 4b3bb5f95c6..f7f1cb026bc 100644 --- a/packages/scope-manager/src/lib/webworker.importscripts.ts +++ b/packages/scope-manager/src/lib/webworker.importscripts.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; export const webworker_importscripts = {} as Record< string, diff --git a/packages/scope-manager/src/lib/webworker.iterable.ts b/packages/scope-manager/src/lib/webworker.iterable.ts index 80a04c759e4..e4b0fb8b940 100644 --- a/packages/scope-manager/src/lib/webworker.iterable.ts +++ b/packages/scope-manager/src/lib/webworker.iterable.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const webworker_iterable = { diff --git a/packages/scope-manager/src/lib/webworker.ts b/packages/scope-manager/src/lib/webworker.ts index 7f800409938..ccbb3efd3c4 100644 --- a/packages/scope-manager/src/lib/webworker.ts +++ b/packages/scope-manager/src/lib/webworker.ts @@ -3,7 +3,7 @@ // RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: // npx nx generate-lib @typescript-eslint/scope-manager -import { ImplicitLibVariableOptions } from '../variable'; +import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE, TYPE_VALUE } from './base-config'; export const webworker = { diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index a69209e86c6..93b0270ebfb 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -675,7 +675,7 @@ class Referencer extends Visitor { member.id.type === AST_NODE_TYPES.Literal && typeof member.id.value === 'string' ) { - const name = member.id as TSESTree.StringLiteral; + const name = member.id; this.currentScope().defineLiteralIdentifier( name, new TSEnumMemberDefinition(name, member), From e6432a94c8147bece7b30e1fd88200eabe4fd373 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 2 Oct 2022 19:30:32 +0900 Subject: [PATCH 07/16] feat(ast-spec): add `TSSatisfiesExpression` node --- packages/ast-spec/src/ast-node-types.ts | 1 + .../src/expression/TSSatisfiesExpression/spec.ts | 10 ++++++++++ packages/ast-spec/src/expression/spec.ts | 1 + packages/ast-spec/src/unions/Expression.ts | 2 ++ packages/ast-spec/src/unions/Node.ts | 2 ++ 5 files changed, 16 insertions(+) create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/spec.ts diff --git a/packages/ast-spec/src/ast-node-types.ts b/packages/ast-spec/src/ast-node-types.ts index ff90dd1ee18..dbed6723fed 100644 --- a/packages/ast-spec/src/ast-node-types.ts +++ b/packages/ast-spec/src/ast-node-types.ts @@ -145,6 +145,7 @@ export enum AST_NODE_TYPES { TSQualifiedName = 'TSQualifiedName', TSReadonlyKeyword = 'TSReadonlyKeyword', TSRestType = 'TSRestType', + TSSatisfiesExpression = 'TSSatisfiesExpression', TSStaticKeyword = 'TSStaticKeyword', TSStringKeyword = 'TSStringKeyword', TSSymbolKeyword = 'TSSymbolKeyword', diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/spec.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/spec.ts new file mode 100644 index 00000000000..1297ade3eba --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSSatisfiesExpression extends BaseNode { + type: AST_NODE_TYPES.TSSatisfiesExpression; + expression: Expression; + typeAnnotation: TypeNode; +} diff --git a/packages/ast-spec/src/expression/spec.ts b/packages/ast-spec/src/expression/spec.ts index 9ed4a0cc756..f753672d472 100644 --- a/packages/ast-spec/src/expression/spec.ts +++ b/packages/ast-spec/src/expression/spec.ts @@ -23,6 +23,7 @@ export * from './TSAsExpression/spec'; export * from './TSEmptyBodyFunctionExpression/spec'; export * from './TSInstantiationExpression/spec'; export * from './TSNonNullExpression/spec'; +export * from './TSSatisfiesExpression/spec'; export * from './TSTypeAssertion/spec'; export * from './TaggedTemplateExpression/spec'; export * from './TemplateLiteral/spec'; diff --git a/packages/ast-spec/src/unions/Expression.ts b/packages/ast-spec/src/unions/Expression.ts index 36220bc0391..1c0ee899ec3 100644 --- a/packages/ast-spec/src/unions/Expression.ts +++ b/packages/ast-spec/src/unions/Expression.ts @@ -25,6 +25,7 @@ import type { ThisExpression } from '../expression/ThisExpression/spec'; import type { TSAsExpression } from '../expression/TSAsExpression/spec'; import type { TSInstantiationExpression } from '../expression/TSInstantiationExpression/spec'; import type { TSNonNullExpression } from '../expression/TSNonNullExpression/spec'; +import type { TSSatisfiesExpression } from '../expression/TSSatisfiesExpression/spec'; import type { TSTypeAssertion } from '../expression/TSTypeAssertion/spec'; import type { UnaryExpression } from '../expression/UnaryExpression/spec'; import type { UpdateExpression } from '../expression/UpdateExpression/spec'; @@ -72,6 +73,7 @@ export type Expression = | TSAsExpression | TSInstantiationExpression | TSNonNullExpression + | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression diff --git a/packages/ast-spec/src/unions/Node.ts b/packages/ast-spec/src/unions/Node.ts index 6505270427b..3656a3d677a 100644 --- a/packages/ast-spec/src/unions/Node.ts +++ b/packages/ast-spec/src/unions/Node.ts @@ -53,6 +53,7 @@ import type { TSAsExpression } from '../expression/TSAsExpression/spec'; import type { TSEmptyBodyFunctionExpression } from '../expression/TSEmptyBodyFunctionExpression/spec'; import type { TSInstantiationExpression } from '../expression/TSInstantiationExpression/spec'; import type { TSNonNullExpression } from '../expression/TSNonNullExpression/spec'; +import type { TSSatisfiesExpression } from '../expression/TSSatisfiesExpression/spec'; import type { TSTypeAssertion } from '../expression/TSTypeAssertion/spec'; import type { UnaryExpression } from '../expression/UnaryExpression/spec'; import type { UpdateExpression } from '../expression/UpdateExpression/spec'; @@ -305,6 +306,7 @@ export type Node = | TSQualifiedName | TSReadonlyKeyword | TSRestType + | TSSatisfiesExpression | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword From eee4b69aaecc90ba860563846f7fa5f1a409ca29 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 2 Oct 2022 19:47:58 +0900 Subject: [PATCH 08/16] feat(typescript-estree): support `satisfies` operator --- packages/typescript-estree/src/convert.ts | 10 +++++++++- .../src/ts-estree/estree-to-ts-node-types.ts | 1 + packages/typescript-estree/src/ts-estree/ts-nodes.ts | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 30c33050d42..450dffe0483 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -31,7 +31,7 @@ import type { ParserWeakMapESTreeToTSNode, } from './parser-options'; import type { SemanticOrSyntacticError } from './semantic-or-syntactic-errors'; -import type { TSESTree, TSESTreeToTSNode, TSNode } from './ts-estree'; +import { TSESTree, TSESTreeToTSNode, TSNode } from './ts-estree'; import { AST_NODE_TYPES } from './ts-estree'; import { typescriptVersionIsAtLeast } from './version-check'; @@ -2954,6 +2954,14 @@ export class Converter { }); } + case SyntaxKind.SatisfiesExpression: { + return this.createNode(node, { + type: AST_NODE_TYPES.TSSatisfiesExpression, + expression: this.convertChild(node.expression), + typeAnnotation: this.convertChild(node.type), + }); + } + default: return this.deeplyCopy(node); } diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index 3b80ab0a958..12ff9392cb0 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -185,6 +185,7 @@ export interface EstreeToTsNodeTypes { [AST_NODE_TYPES.TSInterfaceHeritage]: ts.ExpressionWithTypeArguments; [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode; [AST_NODE_TYPES.TSInstantiationExpression]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSSatisfiesExpression]: ts.SatisfiesExpression; [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode; [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode; [AST_NODE_TYPES.TSMethodSignature]: diff --git a/packages/typescript-estree/src/ts-estree/ts-nodes.ts b/packages/typescript-estree/src/ts-estree/ts-nodes.ts index 28c30ea8bc3..873f98e5a15 100644 --- a/packages/typescript-estree/src/ts-estree/ts-nodes.ts +++ b/packages/typescript-estree/src/ts-estree/ts-nodes.ts @@ -180,6 +180,7 @@ export type TSNode = | ts.UnparsedSource | ts.JsonMinusNumericLiteral | ts.TemplateLiteralTypeNode + | ts.SatisfiesExpression // JSDoc: Unsupported | ts.JSDoc From d97f5a293948f2a07b4a5ede5a92c796d108ed6b Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Mon, 3 Oct 2022 01:57:05 +0900 Subject: [PATCH 09/16] feat(visitor-keys): add `TSSatisfiesExpression` --- packages/visitor-keys/src/visitor-keys.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/visitor-keys/src/visitor-keys.ts b/packages/visitor-keys/src/visitor-keys.ts index a1898e92246..cb3e614df53 100644 --- a/packages/visitor-keys/src/visitor-keys.ts +++ b/packages/visitor-keys/src/visitor-keys.ts @@ -127,6 +127,7 @@ const additionalKeys: AdditionalKeys = { TSQualifiedName: ['left', 'right'], TSReadonlyKeyword: [], TSRestType: ['typeAnnotation'], + TSSatisfiesExpression: ['typeAnnotation', 'expression'], TSStaticKeyword: [], TSStringKeyword: [], TSSymbolKeyword: [], From 687d1cd4cbad1f558cf666017527543bb0c6c725 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Mon, 3 Oct 2022 01:57:23 +0900 Subject: [PATCH 10/16] test(typescript-estree): add tests for `satisfies` --- .../expressions/satisfies-expression.src.ts | 10 + .../tests/ast-alignment/fixtures-to-test.ts | 5 + .../semantic-diagnostics-enabled.test.ts.snap | 2 + .../satisfies-expression.src.ts.shot | 3191 +++++++++++++++++ 4 files changed, 3208 insertions(+) create mode 100644 packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot diff --git a/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts b/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts new file mode 100644 index 00000000000..ba739bc38cc --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts @@ -0,0 +1,10 @@ +x satisfies T; +x < y satisfies boolean; // (x < y) satisfies boolean; +x === 1 satisfies number; // x === (1 satisfies number); +x satisfies any satisfies T; + +const t2 = { a: 1, b: 1 } satisfies I1; // Error +const t3 = { } satisfies I1; // Error +const t4: T1 = { a: "a" } satisfies T1; // Ok +const t5 = (m => m.substring(0)) satisfies T2; // Ok +const t6 = [1, 2] satisfies [number, number]; diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index 6abab590b77..9c4d8a44bcc 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -477,6 +477,11 @@ tester.addFixturePatternConfig('typescript/expressions', { * @see https://github.com/babel/babel/issues/14613 */ 'instantiation-expression', + /** + * TS 4.9 `satisfies` operator has not been implemented in Babel yet. + * @see https://github.com/babel/babel/pull/14211 + */ + 'satisfies-expression', ], }); diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index 204da250a86..d1f22d27eb9 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -2652,6 +2652,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/optional-call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/satisfies-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/tagged-template-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot new file mode 100644 index 00000000000..76cc6293364 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot @@ -0,0 +1,3191 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript expressions satisfies-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "typeParameters": undefined, + }, + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "operator": "<", + "range": Array [ + 15, + 20, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "y", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 15, + 38, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSBooleanKeyword", + }, + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 15, + 39, + ], + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "name": "x", + "range": Array [ + 70, + 71, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "operator": "===", + "range": Array [ + 70, + 94, + ], + "right": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 76, + 77, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 76, + 94, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 88, + 94, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 70, + 95, + ], + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "expression": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "name": "x", + "range": Array [ + 127, + 128, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 127, + 142, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 139, + 142, + ], + "type": "TSAnyKeyword", + }, + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 127, + 154, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 153, + 154, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "name": "T", + "range": Array [ + 153, + 154, + ], + "type": "Identifier", + }, + "typeParameters": undefined, + }, + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 127, + 155, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 6, + "line": 6, + }, + }, + "name": "t2", + "range": Array [ + 163, + 165, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 6, + }, + }, + "name": "a", + "range": Array [ + 170, + 171, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 6, + }, + }, + "method": false, + "range": Array [ + 170, + 174, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 173, + 174, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, + }, + }, + "name": "b", + "range": Array [ + 176, + 177, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, + }, + }, + "method": false, + "range": Array [ + 176, + 180, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 6, + }, + "start": Object { + "column": 22, + "line": 6, + }, + }, + "range": Array [ + 179, + 180, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + }, + ], + "range": Array [ + 168, + 182, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 168, + 195, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 6, + }, + "start": Object { + "column": 36, + "line": 6, + }, + }, + "range": Array [ + 193, + 195, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 6, + }, + "start": Object { + "column": 36, + "line": 6, + }, + }, + "name": "I1", + "range": Array [ + 193, + 195, + ], + "type": "Identifier", + }, + "typeParameters": undefined, + }, + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 6, + }, + "start": Object { + "column": 6, + "line": 6, + }, + }, + "range": Array [ + 163, + 195, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 39, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 157, + 196, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "name": "t3", + "range": Array [ + 212, + 214, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "properties": Array [], + "range": Array [ + 217, + 220, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 217, + 233, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 7, + }, + "start": Object { + "column": 25, + "line": 7, + }, + }, + "range": Array [ + 231, + 233, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 7, + }, + "start": Object { + "column": 25, + "line": 7, + }, + }, + "name": "I1", + "range": Array [ + 231, + 233, + ], + "type": "Identifier", + }, + "typeParameters": undefined, + }, + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "range": Array [ + 212, + 233, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 28, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "range": Array [ + 206, + 234, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 6, + "line": 8, + }, + }, + "name": "t4", + "range": Array [ + 250, + 256, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "range": Array [ + 252, + 256, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 8, + }, + }, + "range": Array [ + 254, + 256, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 8, + }, + }, + "name": "T1", + "range": Array [ + 254, + 256, + ], + "type": "Identifier", + }, + "typeParameters": undefined, + }, + }, + }, + "init": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 17, + "line": 8, + }, + }, + "name": "a", + "range": Array [ + 261, + 262, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 8, + }, + "start": Object { + "column": 17, + "line": 8, + }, + }, + "method": false, + "range": Array [ + 261, + 267, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 8, + }, + "start": Object { + "column": 20, + "line": 8, + }, + }, + "range": Array [ + 264, + 267, + ], + "raw": "\\"a\\"", + "type": "Literal", + "value": "a", + }, + }, + ], + "range": Array [ + 259, + 269, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 259, + 282, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 8, + }, + "start": Object { + "column": 36, + "line": 8, + }, + }, + "range": Array [ + 280, + 282, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 8, + }, + "start": Object { + "column": 36, + "line": 8, + }, + }, + "name": "T1", + "range": Array [ + 280, + 282, + ], + "type": "Identifier", + }, + "typeParameters": undefined, + }, + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 8, + }, + "start": Object { + "column": 6, + "line": 8, + }, + }, + "range": Array [ + 250, + 282, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 39, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 244, + 283, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 9, + }, + "start": Object { + "column": 6, + "line": 9, + }, + }, + "name": "t5", + "range": Array [ + 296, + 298, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "async": false, + "body": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 9, + }, + "start": Object { + "column": 29, + "line": 9, + }, + }, + "range": Array [ + 319, + 320, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + ], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "name": "m", + "range": Array [ + 307, + 308, + ], + "type": "Identifier", + }, + "optional": false, + "property": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 9, + }, + }, + "name": "substring", + "range": Array [ + 309, + 318, + ], + "type": "Identifier", + }, + "range": Array [ + 307, + 318, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "optional": false, + "range": Array [ + 307, + 321, + ], + "type": "CallExpression", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "name": "m", + "range": Array [ + 302, + 303, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 302, + 321, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 45, + "line": 9, + }, + "start": Object { + "column": 11, + "line": 9, + }, + }, + "range": Array [ + 301, + 335, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 9, + }, + "start": Object { + "column": 43, + "line": 9, + }, + }, + "range": Array [ + 333, + 335, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 9, + }, + "start": Object { + "column": 43, + "line": 9, + }, + }, + "name": "T2", + "range": Array [ + 333, + 335, + ], + "type": "Identifier", + }, + "typeParameters": undefined, + }, + }, + "loc": Object { + "end": Object { + "column": 45, + "line": 9, + }, + "start": Object { + "column": 6, + "line": 9, + }, + }, + "range": Array [ + 296, + 335, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 46, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 290, + 336, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 10, + }, + "start": Object { + "column": 6, + "line": 10, + }, + }, + "name": "t6", + "range": Array [ + 349, + 351, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 10, + }, + "start": Object { + "column": 12, + "line": 10, + }, + }, + "range": Array [ + 355, + 356, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 10, + }, + }, + "range": Array [ + 358, + 359, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + ], + "loc": Object { + "end": Object { + "column": 17, + "line": 10, + }, + "start": Object { + "column": 11, + "line": 10, + }, + }, + "range": Array [ + 354, + 360, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 44, + "line": 10, + }, + "start": Object { + "column": 11, + "line": 10, + }, + }, + "range": Array [ + 354, + 387, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 10, + }, + "start": Object { + "column": 29, + "line": 10, + }, + }, + "range": Array [ + 372, + 378, + ], + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 10, + }, + "start": Object { + "column": 37, + "line": 10, + }, + }, + "range": Array [ + 380, + 386, + ], + "type": "TSNumberKeyword", + }, + ], + "loc": Object { + "end": Object { + "column": 44, + "line": 10, + }, + "start": Object { + "column": 28, + "line": 10, + }, + }, + "range": Array [ + 371, + 387, + ], + "type": "TSTupleType", + }, + }, + "loc": Object { + "end": Object { + "column": 44, + "line": 10, + }, + "start": Object { + "column": 6, + "line": 10, + }, + }, + "range": Array [ + 349, + 387, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 45, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 10, + }, + }, + "range": Array [ + 343, + 388, + ], + "type": "VariableDeclaration", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 40, + 69, + ], + "type": "Line", + "value": " (x < y) satisfies boolean;", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 96, + 126, + ], + "type": "Line", + "value": " x === (1 satisfies number);", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 6, + }, + "start": Object { + "column": 40, + "line": 6, + }, + }, + "range": Array [ + 197, + 205, + ], + "type": "Line", + "value": " Error", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 7, + }, + "start": Object { + "column": 29, + "line": 7, + }, + }, + "range": Array [ + 235, + 243, + ], + "type": "Line", + "value": " Error", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 8, + }, + "start": Object { + "column": 40, + "line": 8, + }, + }, + "range": Array [ + 284, + 289, + ], + "type": "Line", + "value": " Ok", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 9, + }, + "start": Object { + "column": 47, + "line": 9, + }, + }, + "range": Array [ + 337, + 342, + ], + "type": "Line", + "value": " Ok", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 11, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 389, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 11, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 21, + 30, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 72, + 75, + ], + "type": "Punctuator", + "value": "===", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 78, + 87, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 88, + 94, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 127, + 128, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 129, + 138, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 139, + 142, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 143, + 152, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 153, + 154, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 154, + 155, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 157, + 162, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 6, + "line": 6, + }, + }, + "range": Array [ + 163, + 165, + ], + "type": "Identifier", + "value": "t2", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 166, + 167, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 168, + 169, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 6, + }, + }, + "range": Array [ + 170, + 171, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 14, + "line": 6, + }, + }, + "range": Array [ + 171, + 172, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 173, + 174, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 6, + }, + }, + "range": Array [ + 174, + 175, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, + }, + }, + "range": Array [ + 176, + 177, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 6, + }, + "start": Object { + "column": 20, + "line": 6, + }, + }, + "range": Array [ + 177, + 178, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 6, + }, + "start": Object { + "column": 22, + "line": 6, + }, + }, + "range": Array [ + 179, + 180, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 6, + }, + "start": Object { + "column": 24, + "line": 6, + }, + }, + "range": Array [ + 181, + 182, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 6, + }, + "start": Object { + "column": 26, + "line": 6, + }, + }, + "range": Array [ + 183, + 192, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 6, + }, + "start": Object { + "column": 36, + "line": 6, + }, + }, + "range": Array [ + 193, + 195, + ], + "type": "Identifier", + "value": "I1", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 6, + }, + "start": Object { + "column": 38, + "line": 6, + }, + }, + "range": Array [ + 195, + 196, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "range": Array [ + 206, + 211, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "range": Array [ + 212, + 214, + ], + "type": "Identifier", + "value": "t3", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "range": Array [ + 215, + 216, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 217, + 218, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 7, + }, + "start": Object { + "column": 13, + "line": 7, + }, + }, + "range": Array [ + 219, + 220, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 7, + }, + "start": Object { + "column": 15, + "line": 7, + }, + }, + "range": Array [ + 221, + 230, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 7, + }, + "start": Object { + "column": 25, + "line": 7, + }, + }, + "range": Array [ + 231, + 233, + ], + "type": "Identifier", + "value": "I1", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 7, + }, + "start": Object { + "column": 27, + "line": 7, + }, + }, + "range": Array [ + 233, + 234, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 244, + 249, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 8, + }, + "start": Object { + "column": 6, + "line": 8, + }, + }, + "range": Array [ + 250, + 252, + ], + "type": "Identifier", + "value": "t4", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "range": Array [ + 252, + 253, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 8, + }, + }, + "range": Array [ + 254, + 256, + ], + "type": "Identifier", + "value": "T1", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 13, + "line": 8, + }, + }, + "range": Array [ + 257, + 258, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 259, + 260, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 17, + "line": 8, + }, + }, + "range": Array [ + 261, + 262, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 8, + }, + "start": Object { + "column": 18, + "line": 8, + }, + }, + "range": Array [ + 262, + 263, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 8, + }, + "start": Object { + "column": 20, + "line": 8, + }, + }, + "range": Array [ + 264, + 267, + ], + "type": "String", + "value": "\\"a\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 8, + }, + "start": Object { + "column": 24, + "line": 8, + }, + }, + "range": Array [ + 268, + 269, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 8, + }, + "start": Object { + "column": 26, + "line": 8, + }, + }, + "range": Array [ + 270, + 279, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 8, + }, + "start": Object { + "column": 36, + "line": 8, + }, + }, + "range": Array [ + 280, + 282, + ], + "type": "Identifier", + "value": "T1", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 8, + }, + "start": Object { + "column": 38, + "line": 8, + }, + }, + "range": Array [ + 282, + 283, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 290, + 295, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 9, + }, + "start": Object { + "column": 6, + "line": 9, + }, + }, + "range": Array [ + 296, + 298, + ], + "type": "Identifier", + "value": "t5", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 9, + }, + "start": Object { + "column": 9, + "line": 9, + }, + }, + "range": Array [ + 299, + 300, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 9, + }, + "start": Object { + "column": 11, + "line": 9, + }, + }, + "range": Array [ + 301, + 302, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "range": Array [ + 302, + 303, + ], + "type": "Identifier", + "value": "m", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 14, + "line": 9, + }, + }, + "range": Array [ + 304, + 306, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "range": Array [ + 307, + 308, + ], + "type": "Identifier", + "value": "m", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 9, + }, + "start": Object { + "column": 18, + "line": 9, + }, + }, + "range": Array [ + 308, + 309, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 9, + }, + }, + "range": Array [ + 309, + 318, + ], + "type": "Identifier", + "value": "substring", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 9, + }, + "start": Object { + "column": 28, + "line": 9, + }, + }, + "range": Array [ + 318, + 319, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 9, + }, + "start": Object { + "column": 29, + "line": 9, + }, + }, + "range": Array [ + 319, + 320, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 9, + }, + "start": Object { + "column": 30, + "line": 9, + }, + }, + "range": Array [ + 320, + 321, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 9, + }, + "start": Object { + "column": 31, + "line": 9, + }, + }, + "range": Array [ + 321, + 322, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 9, + }, + "start": Object { + "column": 33, + "line": 9, + }, + }, + "range": Array [ + 323, + 332, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 9, + }, + "start": Object { + "column": 43, + "line": 9, + }, + }, + "range": Array [ + 333, + 335, + ], + "type": "Identifier", + "value": "T2", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 9, + }, + "start": Object { + "column": 45, + "line": 9, + }, + }, + "range": Array [ + 335, + 336, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 10, + }, + }, + "range": Array [ + 343, + 348, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 10, + }, + "start": Object { + "column": 6, + "line": 10, + }, + }, + "range": Array [ + 349, + 351, + ], + "type": "Identifier", + "value": "t6", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 10, + }, + "start": Object { + "column": 9, + "line": 10, + }, + }, + "range": Array [ + 352, + 353, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 10, + }, + "start": Object { + "column": 11, + "line": 10, + }, + }, + "range": Array [ + 354, + 355, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 10, + }, + "start": Object { + "column": 12, + "line": 10, + }, + }, + "range": Array [ + 355, + 356, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 10, + }, + "start": Object { + "column": 13, + "line": 10, + }, + }, + "range": Array [ + 356, + 357, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 10, + }, + }, + "range": Array [ + 358, + 359, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 10, + }, + "start": Object { + "column": 16, + "line": 10, + }, + }, + "range": Array [ + 359, + 360, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 10, + }, + "start": Object { + "column": 18, + "line": 10, + }, + }, + "range": Array [ + 361, + 370, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 10, + }, + "start": Object { + "column": 28, + "line": 10, + }, + }, + "range": Array [ + 371, + 372, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 10, + }, + "start": Object { + "column": 29, + "line": 10, + }, + }, + "range": Array [ + 372, + 378, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 10, + }, + "start": Object { + "column": 35, + "line": 10, + }, + }, + "range": Array [ + 378, + 379, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 10, + }, + "start": Object { + "column": 37, + "line": 10, + }, + }, + "range": Array [ + 380, + 386, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 10, + }, + "start": Object { + "column": 43, + "line": 10, + }, + }, + "range": Array [ + 386, + 387, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 10, + }, + "start": Object { + "column": 44, + "line": 10, + }, + }, + "range": Array [ + 387, + 388, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; From 2ea0aac234e22348f1adf6c2c08e1a58cf353713 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Mon, 3 Oct 2022 17:22:00 +0900 Subject: [PATCH 11/16] fix: fix type-only imports --- packages/typescript-estree/src/convert.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 450dffe0483..ca53cc45a44 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -31,7 +31,7 @@ import type { ParserWeakMapESTreeToTSNode, } from './parser-options'; import type { SemanticOrSyntacticError } from './semantic-or-syntactic-errors'; -import { TSESTree, TSESTreeToTSNode, TSNode } from './ts-estree'; +import type { TSESTree, TSESTreeToTSNode, TSNode } from './ts-estree'; import { AST_NODE_TYPES } from './ts-estree'; import { typescriptVersionIsAtLeast } from './version-check'; From 3e69a5427dd679c21186e65b86c371d4414abd0c Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 17 Nov 2022 12:31:29 -0500 Subject: [PATCH 12/16] Increased ranges to stable --- README.md | 2 +- package.json | 4 ++-- .../src/parseSettings/warnAboutTSVersion.ts | 2 +- ...typescript+4.9.1-beta.patch => typescript+4.9.3.patch} | 0 yarn.lock | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) rename patches/{typescript+4.9.1-beta.patch => typescript+4.9.3.patch} (100%) diff --git a/README.md b/README.md index bddf59d198b..93bee2f66dc 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ The latest version under the `canary` tag **(latest commit to `main`)** is: ### Supported TypeScript Version -**The version range of TypeScript currently supported by this parser is `>=3.3.1 <4.9.0`.** +**The version range of TypeScript currently supported by this parser is `>=3.3.1 <5.0.0`.** These versions are what we test against. diff --git a/package.json b/package.json index be5832bd132..223e537eda0 100644 --- a/package.json +++ b/package.json @@ -104,10 +104,10 @@ "tmp": "^0.2.1", "ts-node": "^10.7.0", "tslint": "^6.1.3", - "typescript": ">=3.3.1 <4.8.3 || 4.9.1-beta" + "typescript": ">=3.3.1 <=4.9.3" }, "resolutions": { - "typescript": "~4.9.1-beta", + "typescript": "~4.9.3", "@types/node": "^18.0.0", "//": "Pin jest to v29 across the repo", "@jest/create-cache-key-function": "^29", diff --git a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts index b5dc97358e5..ad9a74157d6 100644 --- a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts +++ b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts @@ -12,7 +12,7 @@ const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <5.0.0'; * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one * List them all separately here, so we can automatically create the full string */ -const SUPPORTED_PRERELEASE_RANGES: string[] = ['4.9.1-beta']; +const SUPPORTED_PRERELEASE_RANGES: string[] = []; const ACTIVE_TYPESCRIPT_VERSION = ts.version; const isRunningSupportedTypeScriptVersion = semver.satisfies( ACTIVE_TYPESCRIPT_VERSION, diff --git a/patches/typescript+4.9.1-beta.patch b/patches/typescript+4.9.3.patch similarity index 100% rename from patches/typescript+4.9.1-beta.patch rename to patches/typescript+4.9.3.patch diff --git a/yarn.lock b/yarn.lock index f4c54f533cf..58df5fe6fbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13627,10 +13627,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, "typescript@>=3.3.1 <4.8.3 || 4.9.1-beta", "typescript@^3 || ^4", typescript@next, typescript@~4.8.4, typescript@~4.9.1-beta: - version "4.9.1-beta" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.1-beta.tgz#b5fe1b26f2fe3aeb14790927b25372bebf351c67" - integrity sha512-D4c0t1+sMOS5Hy8DQsGFfEYUuKzolXhf+7e/N0Td5etBPflEYzVwWLBrbVgHpLpLC53OJQCtxk31+NWO2SBPaA== +typescript@*, "typescript@>=3.3.1 <=4.9.3", "typescript@^3 || ^4", typescript@next, typescript@~4.8.4, typescript@~4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db" + integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA== ua-parser-js@^0.7.30: version "0.7.31" From fd6bb05c106df0129c261fd30302e7ab51e007ab Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 17 Nov 2022 12:35:38 -0500 Subject: [PATCH 13/16] Added one more line to satisfies-expression test --- .../expressions/satisfies-expression.src.ts | 1 + .../satisfies-expression.src.ts.shot | 930 +++++++++++++++++- 2 files changed, 929 insertions(+), 2 deletions(-) diff --git a/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts b/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts index ba739bc38cc..54953f1a7f9 100644 --- a/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts +++ b/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts @@ -8,3 +8,4 @@ const t3 = { } satisfies I1; // Error const t4: T1 = { a: "a" } satisfies T1; // Ok const t5 = (m => m.substring(0)) satisfies T2; // Ok const t6 = [1, 2] satisfies [number, number]; +const t7 = (async (context) => context.value) satisfies (context: { value: string }) => Promise; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot index 76cc6293364..099d606a868 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot @@ -1456,6 +1456,410 @@ Object { ], "type": "VariableDeclaration", }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 11, + }, + "start": Object { + "column": 6, + "line": 11, + }, + }, + "name": "t7", + "range": Array [ + 395, + 397, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "async": true, + "body": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 44, + "line": 11, + }, + "start": Object { + "column": 31, + "line": 11, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 11, + }, + "start": Object { + "column": 31, + "line": 11, + }, + }, + "name": "context", + "range": Array [ + 420, + 427, + ], + "type": "Identifier", + }, + "optional": false, + "property": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 11, + }, + "start": Object { + "column": 39, + "line": 11, + }, + }, + "name": "value", + "range": Array [ + 428, + 433, + ], + "type": "Identifier", + }, + "range": Array [ + 420, + 433, + ], + "type": "MemberExpression", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 44, + "line": 11, + }, + "start": Object { + "column": 12, + "line": 11, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 11, + }, + "start": Object { + "column": 19, + "line": 11, + }, + }, + "name": "context", + "range": Array [ + 408, + 415, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 401, + 433, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 103, + "line": 11, + }, + "start": Object { + "column": 11, + "line": 11, + }, + }, + "range": Array [ + 400, + 492, + ], + "type": "TSSatisfiesExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 103, + "line": 11, + }, + "start": Object { + "column": 56, + "line": 11, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 83, + "line": 11, + }, + "start": Object { + "column": 57, + "line": 11, + }, + }, + "name": "context", + "range": Array [ + 446, + 472, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 83, + "line": 11, + }, + "start": Object { + "column": 64, + "line": 11, + }, + }, + "range": Array [ + 453, + 472, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 83, + "line": 11, + }, + "start": Object { + "column": 66, + "line": 11, + }, + }, + "members": Array [ + Object { + "computed": false, + "export": undefined, + "initializer": undefined, + "key": Object { + "loc": Object { + "end": Object { + "column": 73, + "line": 11, + }, + "start": Object { + "column": 68, + "line": 11, + }, + }, + "name": "value", + "range": Array [ + 457, + 462, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 81, + "line": 11, + }, + "start": Object { + "column": 68, + "line": 11, + }, + }, + "optional": undefined, + "range": Array [ + 457, + 470, + ], + "readonly": undefined, + "static": undefined, + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 81, + "line": 11, + }, + "start": Object { + "column": 73, + "line": 11, + }, + }, + "range": Array [ + 462, + 470, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 81, + "line": 11, + }, + "start": Object { + "column": 75, + "line": 11, + }, + }, + "range": Array [ + 464, + 470, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 455, + 472, + ], + "type": "TSTypeLiteral", + }, + }, + }, + ], + "range": Array [ + 445, + 492, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 103, + "line": 11, + }, + "start": Object { + "column": 85, + "line": 11, + }, + }, + "range": Array [ + 474, + 492, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 103, + "line": 11, + }, + "start": Object { + "column": 88, + "line": 11, + }, + }, + "range": Array [ + 477, + 492, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 95, + "line": 11, + }, + "start": Object { + "column": 88, + "line": 11, + }, + }, + "name": "Promise", + "range": Array [ + 477, + 484, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 103, + "line": 11, + }, + "start": Object { + "column": 95, + "line": 11, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 102, + "line": 11, + }, + "start": Object { + "column": 96, + "line": 11, + }, + }, + "range": Array [ + 485, + 491, + ], + "type": "TSStringKeyword", + }, + ], + "range": Array [ + 484, + 492, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + "type": "TSFunctionType", + }, + }, + "loc": Object { + "end": Object { + "column": 103, + "line": 11, + }, + "start": Object { + "column": 6, + "line": 11, + }, + }, + "range": Array [ + 395, + 492, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 104, + "line": 11, + }, + "start": Object { + "column": 0, + "line": 11, + }, + }, + "range": Array [ + 389, + 493, + ], + "type": "VariableDeclaration", + }, ], "comments": Array [ Object { @@ -1570,7 +1974,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 11, + "line": 12, }, "start": Object { "column": 0, @@ -1579,7 +1983,7 @@ Object { }, "range": Array [ 0, - 389, + 494, ], "sourceType": "script", "tokens": Array [ @@ -3185,6 +3589,528 @@ Object { "type": "Punctuator", "value": ";", }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 0, + "line": 11, + }, + }, + "range": Array [ + 389, + 394, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 11, + }, + "start": Object { + "column": 6, + "line": 11, + }, + }, + "range": Array [ + 395, + 397, + ], + "type": "Identifier", + "value": "t7", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 11, + }, + "start": Object { + "column": 9, + "line": 11, + }, + }, + "range": Array [ + 398, + 399, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 11, + }, + "start": Object { + "column": 11, + "line": 11, + }, + }, + "range": Array [ + 400, + 401, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 11, + }, + "start": Object { + "column": 12, + "line": 11, + }, + }, + "range": Array [ + 401, + 406, + ], + "type": "Identifier", + "value": "async", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 11, + }, + "start": Object { + "column": 18, + "line": 11, + }, + }, + "range": Array [ + 407, + 408, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 11, + }, + "start": Object { + "column": 19, + "line": 11, + }, + }, + "range": Array [ + 408, + 415, + ], + "type": "Identifier", + "value": "context", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 11, + }, + "start": Object { + "column": 26, + "line": 11, + }, + }, + "range": Array [ + 415, + 416, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 11, + }, + "start": Object { + "column": 28, + "line": 11, + }, + }, + "range": Array [ + 417, + 419, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 11, + }, + "start": Object { + "column": 31, + "line": 11, + }, + }, + "range": Array [ + 420, + 427, + ], + "type": "Identifier", + "value": "context", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 11, + }, + "start": Object { + "column": 38, + "line": 11, + }, + }, + "range": Array [ + 427, + 428, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 11, + }, + "start": Object { + "column": 39, + "line": 11, + }, + }, + "range": Array [ + 428, + 433, + ], + "type": "Identifier", + "value": "value", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 11, + }, + "start": Object { + "column": 44, + "line": 11, + }, + }, + "range": Array [ + 433, + 434, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 11, + }, + "start": Object { + "column": 46, + "line": 11, + }, + }, + "range": Array [ + 435, + 444, + ], + "type": "Identifier", + "value": "satisfies", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 11, + }, + "start": Object { + "column": 56, + "line": 11, + }, + }, + "range": Array [ + 445, + 446, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 11, + }, + "start": Object { + "column": 57, + "line": 11, + }, + }, + "range": Array [ + 446, + 453, + ], + "type": "Identifier", + "value": "context", + }, + Object { + "loc": Object { + "end": Object { + "column": 65, + "line": 11, + }, + "start": Object { + "column": 64, + "line": 11, + }, + }, + "range": Array [ + 453, + 454, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 67, + "line": 11, + }, + "start": Object { + "column": 66, + "line": 11, + }, + }, + "range": Array [ + 455, + 456, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 73, + "line": 11, + }, + "start": Object { + "column": 68, + "line": 11, + }, + }, + "range": Array [ + 457, + 462, + ], + "type": "Identifier", + "value": "value", + }, + Object { + "loc": Object { + "end": Object { + "column": 74, + "line": 11, + }, + "start": Object { + "column": 73, + "line": 11, + }, + }, + "range": Array [ + 462, + 463, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 81, + "line": 11, + }, + "start": Object { + "column": 75, + "line": 11, + }, + }, + "range": Array [ + 464, + 470, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 83, + "line": 11, + }, + "start": Object { + "column": 82, + "line": 11, + }, + }, + "range": Array [ + 471, + 472, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 84, + "line": 11, + }, + "start": Object { + "column": 83, + "line": 11, + }, + }, + "range": Array [ + 472, + 473, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 87, + "line": 11, + }, + "start": Object { + "column": 85, + "line": 11, + }, + }, + "range": Array [ + 474, + 476, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 95, + "line": 11, + }, + "start": Object { + "column": 88, + "line": 11, + }, + }, + "range": Array [ + 477, + 484, + ], + "type": "Identifier", + "value": "Promise", + }, + Object { + "loc": Object { + "end": Object { + "column": 96, + "line": 11, + }, + "start": Object { + "column": 95, + "line": 11, + }, + }, + "range": Array [ + 484, + 485, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 102, + "line": 11, + }, + "start": Object { + "column": 96, + "line": 11, + }, + }, + "range": Array [ + 485, + 491, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 103, + "line": 11, + }, + "start": Object { + "column": 102, + "line": 11, + }, + }, + "range": Array [ + 491, + 492, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 104, + "line": 11, + }, + "start": Object { + "column": 103, + "line": 11, + }, + }, + "range": Array [ + 492, + 493, + ], + "type": "Punctuator", + "value": ";", + }, ], "type": "Program", } From 21d9a620d913d87c72dccd6602204a2bda888714 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 17 Nov 2022 13:12:13 -0500 Subject: [PATCH 14/16] Correct range to <5.0.0 --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 223e537eda0..18ba89abb88 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "tmp": "^0.2.1", "ts-node": "^10.7.0", "tslint": "^6.1.3", - "typescript": ">=3.3.1 <=4.9.3" + "typescript": ">=3.3.1 <5.0.0" }, "resolutions": { "typescript": "~4.9.3", diff --git a/yarn.lock b/yarn.lock index 58df5fe6fbc..d70edc32422 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13627,7 +13627,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, "typescript@>=3.3.1 <=4.9.3", "typescript@^3 || ^4", typescript@next, typescript@~4.8.4, typescript@~4.9.3: +typescript@*, "typescript@>=3.3.1 <5.0.0", "typescript@^3 || ^4", typescript@next, typescript@~4.8.4, typescript@~4.9.3: version "4.9.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db" integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA== From e39feeb4566e3d20fd00dd08b9b677f971b1d89d Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Fri, 18 Nov 2022 10:46:55 +1030 Subject: [PATCH 15/16] switch tests to ast-spec fixtures and update babel --- package.json | 12 +- .../fixtures/array-array/fixture.ts | 1 + .../array-array/snapshots/1-TSESTree-AST.shot | 149 + .../snapshots/2-TSESTree-Tokens.shot | 166 + .../array-array/snapshots/3-Babel-AST.shot | 149 + .../array-array/snapshots/4-Babel-Tokens.shot | 166 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../arrow-func-no-parentheses/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 68 + .../snapshots/2-TSESTree-Tokens.shot | 66 + .../snapshots/3-Babel-AST.shot | 68 + .../snapshots/4-Babel-Tokens.shot | 66 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../arrow-func-with-parentheses/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 87 + .../snapshots/2-TSESTree-Tokens.shot | 116 + .../snapshots/3-Babel-AST.shot | 87 + .../snapshots/4-Babel-Tokens.shot | 116 + .../snapshots/5-AST-Alignment-AST.shot | 93 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../fixtures/chained-satisfies/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 91 + .../snapshots/2-TSESTree-Tokens.shot | 66 + .../snapshots/3-Babel-AST.shot | 91 + .../snapshots/4-Babel-Tokens.shot | 66 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../conditional-no-parentheses/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 84 + .../snapshots/2-TSESTree-Tokens.shot | 86 + .../snapshots/3-Babel-AST.shot | 84 + .../snapshots/4-Babel-Tokens.shot | 86 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../conditional-with-parentheses/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 84 + .../snapshots/2-TSESTree-Tokens.shot | 106 + .../snapshots/3-Babel-AST.shot | 84 + .../snapshots/4-Babel-Tokens.shot | 106 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../fixtures/identifier-keyword/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 53 + .../snapshots/2-TSESTree-Tokens.shot | 46 + .../snapshots/3-Babel-AST.shot | 53 + .../snapshots/4-Babel-Tokens.shot | 46 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../identifier-object-type/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 104 + .../snapshots/2-TSESTree-Tokens.shot | 86 + .../snapshots/3-Babel-AST.shot | 104 + .../snapshots/4-Babel-Tokens.shot | 86 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../fixtures/identifier-tuple-type/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 115 + .../snapshots/2-TSESTree-Tokens.shot | 106 + .../snapshots/3-Babel-AST.shot | 115 + .../snapshots/4-Babel-Tokens.shot | 106 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../logical-no-parentheses/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 74 + .../snapshots/2-TSESTree-Tokens.shot | 66 + .../snapshots/3-Babel-AST.shot | 74 + .../snapshots/4-Babel-Tokens.shot | 66 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../logical-with-parentheses/fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 74 + .../snapshots/2-TSESTree-Tokens.shot | 86 + .../snapshots/3-Babel-AST.shot | 74 + .../snapshots/4-Babel-Tokens.shot | 86 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 128 + .../snapshots/2-TSESTree-Tokens.shot | 146 + .../snapshots/3-Babel-AST.shot | 128 + .../snapshots/4-Babel-Tokens.shot | 146 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../fixture.ts | 1 + .../snapshots/1-TSESTree-AST.shot | 128 + .../snapshots/2-TSESTree-Tokens.shot | 146 + .../snapshots/3-Babel-AST.shot | 128 + .../snapshots/4-Babel-Tokens.shot | 146 + .../snapshots/5-AST-Alignment-AST.shot | 6 + .../snapshots/6-AST-Alignment-Tokens.shot | 6 + .../tests/fixtures-with-differences-ast.shot | 1 + .../expressions/satisfies-expression.src.ts | 11 - .../semantic-diagnostics-enabled.test.ts.snap | 2 - .../satisfies-expression.src.ts.shot | 4117 ----------------- yarn.lock | 118 +- 97 files changed, 5431 insertions(+), 4140 deletions(-) create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/6-AST-Alignment-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/fixture.ts create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/1-TSESTree-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/2-TSESTree-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/3-Babel-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/4-Babel-Tokens.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/5-AST-Alignment-AST.shot create mode 100644 packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/6-AST-Alignment-Tokens.shot delete mode 100644 packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts delete mode 100644 packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot diff --git a/package.json b/package.json index f7c782af36e..e13d754021e 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,11 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "devDependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/eslint-parser": "^7.18.2", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", + "@babel/code-frame": "^7.18.6", + "@babel/core": "^7.20.2", + "@babel/eslint-parser": "^7.19.1", + "@babel/parser": "^7.20.3", + "@babel/types": "^7.20.2", "@nrwl/nx-cloud": "14.7.0", "@nrwl/workspace": "14.8.4", "@swc/core": "^1.3.1", @@ -109,7 +110,7 @@ "resolutions": { "typescript": "~4.9.3", "@types/node": "^18.11.9", - "//": "Pin jest to v29 across the repo", + "//": "Stub out unnecessary swc packages to improve install size and speed", "@jest/create-cache-key-function": "^29", "@jest/reporters": "^29", "@jest/test-result": "^29", @@ -121,7 +122,6 @@ "jest-snapshot": "^29", "jest-util": "^29", "pretty-format": "^29", - "//": "Stub out unnecessary swc packages to improve install size and speed", "@swc/core-android-arm-eabi": "npm:dummypkg-a@1.0.0", "@swc/core-android-arm64": "npm:dummypkg-a@1.0.0", "@swc/core-freebsd-x64": "npm:dummypkg-a@1.0.0", diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/fixture.ts new file mode 100644 index 00000000000..917317da825 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/fixture.ts @@ -0,0 +1 @@ +[1,2,3] satisfies [1, 2, 3]; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..8c0e41971ea --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,149 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression array-array TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ArrayExpression { + type: "ArrayExpression", + elements: Array [ + Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Literal { + type: "Literal", + raw: "2", + value: 2, + + range: [3, 4], + loc: { + start: { column: 3, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Literal { + type: "Literal", + raw: "3", + value: 3, + + range: [5, 6], + loc: { + start: { column: 5, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + ], + + range: [0, 7], + loc: { + start: { column: 0, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + typeAnnotation: TSTupleType { + type: "TSTupleType", + elementTypes: Array [ + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "2", + value: 2, + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "3", + value: 3, + + range: [25, 26], + loc: { + start: { column: 25, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [25, 26], + loc: { + start: { column: 25, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + ], + + range: [18, 27], + loc: { + start: { column: 18, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + + range: [0, 27], + loc: { + start: { column: 0, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + + range: [0, 28], + loc: { + start: { column: 0, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 29], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..1bde181188c --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,166 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression array-array TSESTree - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "[", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [2, 3], + loc: { + start: { column: 2, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "2", + + range: [3, 4], + loc: { + start: { column: 3, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [4, 5], + loc: { + start: { column: 4, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "3", + + range: [5, 6], + loc: { + start: { column: 5, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "]", + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [8, 17], + loc: { + start: { column: 8, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "[", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [20, 21], + loc: { + start: { column: 20, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "2", + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [23, 24], + loc: { + start: { column: 23, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "3", + + range: [25, 26], + loc: { + start: { column: 25, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "]", + + range: [26, 27], + loc: { + start: { column: 26, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [27, 28], + loc: { + start: { column: 27, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..d7f5aec514e --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/3-Babel-AST.shot @@ -0,0 +1,149 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression array-array Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ArrayExpression { + type: "ArrayExpression", + elements: Array [ + Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Literal { + type: "Literal", + raw: "2", + value: 2, + + range: [3, 4], + loc: { + start: { column: 3, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Literal { + type: "Literal", + raw: "3", + value: 3, + + range: [5, 6], + loc: { + start: { column: 5, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + ], + + range: [0, 7], + loc: { + start: { column: 0, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + typeAnnotation: TSTupleType { + type: "TSTupleType", + elementTypes: Array [ + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "2", + value: 2, + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "3", + value: 3, + + range: [25, 26], + loc: { + start: { column: 25, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [25, 26], + loc: { + start: { column: 25, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + ], + + range: [18, 27], + loc: { + start: { column: 18, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + + range: [0, 27], + loc: { + start: { column: 0, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + + range: [0, 28], + loc: { + start: { column: 0, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 29], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..02abe5d8cba --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,166 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression array-array Babel - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "[", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [2, 3], + loc: { + start: { column: 2, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "2", + + range: [3, 4], + loc: { + start: { column: 3, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [4, 5], + loc: { + start: { column: 4, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "3", + + range: [5, 6], + loc: { + start: { column: 5, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "]", + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [8, 17], + loc: { + start: { column: 8, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "[", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [20, 21], + loc: { + start: { column: 20, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "2", + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [23, 24], + loc: { + start: { column: 23, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "3", + + range: [25, 26], + loc: { + start: { column: 25, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "]", + + range: [26, 27], + loc: { + start: { column: 26, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [27, 28], + loc: { + start: { column: 27, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..3cf7cab2487 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression array-array AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..263f9da8e6c --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression array-array AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/fixture.ts new file mode 100644 index 00000000000..8478834cb78 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/fixture.ts @@ -0,0 +1 @@ +() => 1 satisfies number diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..57067f8fbff --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,68 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-no-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: ArrowFunctionExpression { + type: "ArrowFunctionExpression", + async: false, + body: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [18, 24], + loc: { + start: { column: 18, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + + range: [6, 24], + loc: { + start: { column: 6, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + expression: true, + generator: false, + id: null, + params: Array [], + + range: [0, 24], + loc: { + start: { column: 0, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + + range: [0, 24], + loc: { + start: { column: 0, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 25], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..09102ae267b --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-no-parentheses TSESTree - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=>", + + range: [3, 5], + loc: { + start: { column: 3, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [8, 17], + loc: { + start: { column: 8, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [18, 24], + loc: { + start: { column: 18, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..1ef0e54b35d --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,68 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-no-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: ArrowFunctionExpression { + type: "ArrowFunctionExpression", + async: false, + body: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [18, 24], + loc: { + start: { column: 18, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + + range: [6, 24], + loc: { + start: { column: 6, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + expression: true, + generator: false, + id: null, + params: Array [], + + range: [0, 24], + loc: { + start: { column: 0, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + + range: [0, 24], + loc: { + start: { column: 0, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 25], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..24cc5b2042e --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-no-parentheses Babel - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=>", + + range: [3, 5], + loc: { + start: { column: 3, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [8, 17], + loc: { + start: { column: 8, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [18, 24], + loc: { + start: { column: 18, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..4697cea82c6 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-no-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..7fd90338cb4 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-no-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/fixture.ts new file mode 100644 index 00000000000..15624b9aaf3 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/fixture.ts @@ -0,0 +1 @@ +(() => 1) satisfies () => number diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..7fa95a22000 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,87 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-with-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ArrowFunctionExpression { + type: "ArrowFunctionExpression", + async: false, + body: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + expression: true, + generator: false, + id: null, + params: Array [], + + range: [1, 8], + loc: { + start: { column: 1, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + typeAnnotation: TSFunctionType { + type: "TSFunctionType", + params: Array [], + returnType: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [26, 32], + loc: { + start: { column: 26, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [23, 32], + loc: { + start: { column: 23, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [20, 32], + loc: { + start: { column: 20, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 33], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..b590cfdea64 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-with-parentheses TSESTree - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "(", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [2, 3], + loc: { + start: { column: 2, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=>", + + range: [4, 6], + loc: { + start: { column: 4, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [10, 19], + loc: { + start: { column: 10, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "(", + + range: [20, 21], + loc: { + start: { column: 20, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=>", + + range: [23, 25], + loc: { + start: { column: 23, line: 1 }, + end: { column: 25, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [26, 32], + loc: { + start: { column: 26, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..71627f35b04 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,87 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-with-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ArrowFunctionExpression { + type: "ArrowFunctionExpression", + async: false, + body: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + expression: true, + generator: false, + id: null, + params: Array [], + + range: [1, 8], + loc: { + start: { column: 1, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + typeAnnotation: TSFunctionType { + type: "TSFunctionType", + parameters: Array [], + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [26, 32], + loc: { + start: { column: 26, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [23, 32], + loc: { + start: { column: 23, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [20, 32], + loc: { + start: { column: 20, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 33], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..58d8821988a --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-with-parentheses Babel - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "(", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [2, 3], + loc: { + start: { column: 2, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=>", + + range: [4, 6], + loc: { + start: { column: 4, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [10, 19], + loc: { + start: { column: 10, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "(", + + range: [20, 21], + loc: { + start: { column: 20, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=>", + + range: [23, 25], + loc: { + start: { column: 23, line: 1 }, + end: { column: 25, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [26, 32], + loc: { + start: { column: 26, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..b45b591c63d --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,93 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-with-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ExpressionStatement { + type: 'ExpressionStatement', + expression: TSSatisfiesExpression { + type: 'TSSatisfiesExpression', + expression: ArrowFunctionExpression { + type: 'ArrowFunctionExpression', + async: false, + body: Literal { + type: 'Literal', + raw: '1', + value: 1, + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + expression: true, + generator: false, + id: null, + params: Array [], + + range: [1, 8], + loc: { + start: { column: 1, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + typeAnnotation: TSFunctionType { + type: 'TSFunctionType', +- params: Array [], +- returnType: TSTypeAnnotation { ++ parameters: Array [], ++ typeAnnotation: TSTypeAnnotation { + type: 'TSTypeAnnotation', + typeAnnotation: TSNumberKeyword { + type: 'TSNumberKeyword', + + range: [26, 32], + loc: { + start: { column: 26, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [23, 32], + loc: { + start: { column: 23, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [20, 32], + loc: { + start: { column: 20, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + ], + sourceType: 'script', + + range: [0, 33], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, + }" +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..f3d317fb4b7 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression arrow-func-with-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/fixture.ts new file mode 100644 index 00000000000..65dcd3629bd --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/fixture.ts @@ -0,0 +1 @@ +foo satisfies bar satisfies baz; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..508caf4b944 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,91 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression chained-satisfies TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSTypeReference { + type: "TSTypeReference", + typeName: Identifier { + type: "Identifier", + name: "bar", + + range: [14, 17], + loc: { + start: { column: 14, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [14, 17], + loc: { + start: { column: 14, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [0, 17], + loc: { + start: { column: 0, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + typeAnnotation: TSTypeReference { + type: "TSTypeReference", + typeName: Identifier { + type: "Identifier", + name: "baz", + + range: [28, 31], + loc: { + start: { column: 28, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [28, 31], + loc: { + start: { column: 28, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 33], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..dd0ebe5a72f --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression chained-satisfies TSESTree - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "bar", + + range: [14, 17], + loc: { + start: { column: 14, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [18, 27], + loc: { + start: { column: 18, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "baz", + + range: [28, 31], + loc: { + start: { column: 28, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [31, 32], + loc: { + start: { column: 31, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..190d8d14fd0 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/3-Babel-AST.shot @@ -0,0 +1,91 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression chained-satisfies Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSTypeReference { + type: "TSTypeReference", + typeName: Identifier { + type: "Identifier", + name: "bar", + + range: [14, 17], + loc: { + start: { column: 14, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [14, 17], + loc: { + start: { column: 14, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [0, 17], + loc: { + start: { column: 0, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + typeAnnotation: TSTypeReference { + type: "TSTypeReference", + typeName: Identifier { + type: "Identifier", + name: "baz", + + range: [28, 31], + loc: { + start: { column: 28, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [28, 31], + loc: { + start: { column: 28, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 33], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..5afc144ecef --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression chained-satisfies Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "bar", + + range: [14, 17], + loc: { + start: { column: 14, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [18, 27], + loc: { + start: { column: 18, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "baz", + + range: [28, 31], + loc: { + start: { column: 28, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [31, 32], + loc: { + start: { column: 31, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..0d7d689095e --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression chained-satisfies AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..b7cbaaf6bb8 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/chained-satisfies/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression chained-satisfies AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/fixture.ts new file mode 100644 index 00000000000..6ead32331fa --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/fixture.ts @@ -0,0 +1 @@ +foo ? 1 : 0 satisfies number; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..5674f78acdf --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,84 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-no-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: ConditionalExpression { + type: "ConditionalExpression", + alternate: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Literal { + type: "Literal", + raw: "0", + value: 0, + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [22, 28], + loc: { + start: { column: 22, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + + range: [10, 28], + loc: { + start: { column: 10, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + consequent: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + test: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + + range: [0, 28], + loc: { + start: { column: 0, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + + range: [0, 29], + loc: { + start: { column: 0, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 30], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..579fa0c0615 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-no-parentheses TSESTree - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "?", + + range: [4, 5], + loc: { + start: { column: 4, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "0", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [12, 21], + loc: { + start: { column: 12, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [22, 28], + loc: { + start: { column: 22, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [28, 29], + loc: { + start: { column: 28, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..9c3ff77da55 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,84 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-no-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: ConditionalExpression { + type: "ConditionalExpression", + alternate: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Literal { + type: "Literal", + raw: "0", + value: 0, + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [22, 28], + loc: { + start: { column: 22, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + + range: [10, 28], + loc: { + start: { column: 10, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + consequent: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + test: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + + range: [0, 28], + loc: { + start: { column: 0, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + + range: [0, 29], + loc: { + start: { column: 0, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 30], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..d9c69f96e5e --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-no-parentheses Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "?", + + range: [4, 5], + loc: { + start: { column: 4, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [6, 7], + loc: { + start: { column: 6, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "0", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [12, 21], + loc: { + start: { column: 12, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [22, 28], + loc: { + start: { column: 22, line: 1 }, + end: { column: 28, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [28, 29], + loc: { + start: { column: 28, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..a35b55978ba --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-no-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..220450772c1 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-no-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/fixture.ts new file mode 100644 index 00000000000..5c71ca2d0e6 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/fixture.ts @@ -0,0 +1 @@ +(foo ? 1 : 0) satisfies number; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..2194d921890 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,84 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-with-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ConditionalExpression { + type: "ConditionalExpression", + alternate: Literal { + type: "Literal", + raw: "0", + value: 0, + + range: [11, 12], + loc: { + start: { column: 11, line: 1 }, + end: { column: 12, line: 1 }, + }, + }, + consequent: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + test: Identifier { + type: "Identifier", + name: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + + range: [1, 12], + loc: { + start: { column: 1, line: 1 }, + end: { column: 12, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [24, 30], + loc: { + start: { column: 24, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + + range: [0, 30], + loc: { + start: { column: 0, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..09ed0254895 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,106 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-with-parentheses TSESTree - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "?", + + range: [5, 6], + loc: { + start: { column: 5, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [9, 10], + loc: { + start: { column: 9, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "0", + + range: [11, 12], + loc: { + start: { column: 11, line: 1 }, + end: { column: 12, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [12, 13], + loc: { + start: { column: 12, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [14, 23], + loc: { + start: { column: 14, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [24, 30], + loc: { + start: { column: 24, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [30, 31], + loc: { + start: { column: 30, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..39a9e9951ad --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,84 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-with-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ConditionalExpression { + type: "ConditionalExpression", + alternate: Literal { + type: "Literal", + raw: "0", + value: 0, + + range: [11, 12], + loc: { + start: { column: 11, line: 1 }, + end: { column: 12, line: 1 }, + }, + }, + consequent: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + test: Identifier { + type: "Identifier", + name: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + + range: [1, 12], + loc: { + start: { column: 1, line: 1 }, + end: { column: 12, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [24, 30], + loc: { + start: { column: 24, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + + range: [0, 30], + loc: { + start: { column: 0, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..7ca2b46ad24 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,106 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-with-parentheses Babel - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "?", + + range: [5, 6], + loc: { + start: { column: 5, line: 1 }, + end: { column: 6, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [9, 10], + loc: { + start: { column: 9, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "0", + + range: [11, 12], + loc: { + start: { column: 11, line: 1 }, + end: { column: 12, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [12, 13], + loc: { + start: { column: 12, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [14, 23], + loc: { + start: { column: 14, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [24, 30], + loc: { + start: { column: 24, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [30, 31], + loc: { + start: { column: 30, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..45e35dfc272 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-with-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..36442e7ebdc --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/conditional-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression conditional-with-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/fixture.ts new file mode 100644 index 00000000000..2ce6678d398 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/fixture.ts @@ -0,0 +1 @@ +foo satisfies boolean; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..7b7bb15a5af --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,53 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-keyword TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSBooleanKeyword { + type: "TSBooleanKeyword", + + range: [14, 21], + loc: { + start: { column: 14, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + + range: [0, 21], + loc: { + start: { column: 0, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + + range: [0, 22], + loc: { + start: { column: 0, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 23], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..3563bcb2809 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-keyword TSESTree - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "boolean", + + range: [14, 21], + loc: { + start: { column: 14, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..8be9fb16653 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/3-Babel-AST.shot @@ -0,0 +1,53 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-keyword Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSBooleanKeyword { + type: "TSBooleanKeyword", + + range: [14, 21], + loc: { + start: { column: 14, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + + range: [0, 21], + loc: { + start: { column: 0, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + + range: [0, 22], + loc: { + start: { column: 0, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 23], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..2559a7666c6 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-keyword Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "boolean", + + range: [14, 21], + loc: { + start: { column: 14, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..c167cbcb46b --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-keyword AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..7dad93b1da3 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-keyword/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-keyword AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/fixture.ts new file mode 100644 index 00000000000..cdcca67f637 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/fixture.ts @@ -0,0 +1 @@ +foo satisfies { prop: 'value' }; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..6197262c7a0 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,104 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-object-type TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSTypeLiteral { + type: "TSTypeLiteral", + members: Array [ + TSPropertySignature { + type: "TSPropertySignature", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [16, 20], + loc: { + start: { column: 16, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "'value'", + value: "value", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [20, 29], + loc: { + start: { column: 20, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [16, 29], + loc: { + start: { column: 16, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + ], + + range: [14, 31], + loc: { + start: { column: 14, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 33], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..99673ea1ecf --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-object-type TSESTree - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [14, 15], + loc: { + start: { column: 14, line: 1 }, + end: { column: 15, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [16, 20], + loc: { + start: { column: 16, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [20, 21], + loc: { + start: { column: 20, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + String { + type: "String", + value: "'value'", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [30, 31], + loc: { + start: { column: 30, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [31, 32], + loc: { + start: { column: 31, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..a2861a34b1f --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/3-Babel-AST.shot @@ -0,0 +1,104 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-object-type Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSTypeLiteral { + type: "TSTypeLiteral", + members: Array [ + TSPropertySignature { + type: "TSPropertySignature", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [16, 20], + loc: { + start: { column: 16, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "'value'", + value: "value", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [20, 29], + loc: { + start: { column: 20, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [16, 29], + loc: { + start: { column: 16, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + ], + + range: [14, 31], + loc: { + start: { column: 14, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + + range: [0, 32], + loc: { + start: { column: 0, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 33], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..34926c2bea7 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-object-type Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [14, 15], + loc: { + start: { column: 14, line: 1 }, + end: { column: 15, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [16, 20], + loc: { + start: { column: 16, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [20, 21], + loc: { + start: { column: 20, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + String { + type: "String", + value: "'value'", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [30, 31], + loc: { + start: { column: 30, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [31, 32], + loc: { + start: { column: 31, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..8e025552275 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-object-type AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..bfb99b63e1c --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-object-type/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-object-type AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/fixture.ts new file mode 100644 index 00000000000..266a2ad0836 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/fixture.ts @@ -0,0 +1 @@ +foo satisfies [1, 2, 3]; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..57c80c5a805 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,115 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-tuple-type TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSTupleType { + type: "TSTupleType", + elementTypes: Array [ + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [15, 16], + loc: { + start: { column: 15, line: 1 }, + end: { column: 16, line: 1 }, + }, + }, + + range: [15, 16], + loc: { + start: { column: 15, line: 1 }, + end: { column: 16, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "2", + value: 2, + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "3", + value: 3, + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + ], + + range: [14, 23], + loc: { + start: { column: 14, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + + range: [0, 23], + loc: { + start: { column: 0, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + + range: [0, 24], + loc: { + start: { column: 0, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 25], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..07ece3eadee --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,106 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-tuple-type TSESTree - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "[", + + range: [14, 15], + loc: { + start: { column: 14, line: 1 }, + end: { column: 15, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [15, 16], + loc: { + start: { column: 15, line: 1 }, + end: { column: 16, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [16, 17], + loc: { + start: { column: 16, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "2", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "3", + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "]", + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [23, 24], + loc: { + start: { column: 23, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..7201de5d38f --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/3-Babel-AST.shot @@ -0,0 +1,115 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-tuple-type Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + typeAnnotation: TSTupleType { + type: "TSTupleType", + elementTypes: Array [ + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [15, 16], + loc: { + start: { column: 15, line: 1 }, + end: { column: 16, line: 1 }, + }, + }, + + range: [15, 16], + loc: { + start: { column: 15, line: 1 }, + end: { column: 16, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "2", + value: 2, + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + TSLiteralType { + type: "TSLiteralType", + literal: Literal { + type: "Literal", + raw: "3", + value: 3, + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + ], + + range: [14, 23], + loc: { + start: { column: 14, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + + range: [0, 23], + loc: { + start: { column: 0, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + + range: [0, 24], + loc: { + start: { column: 0, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 25], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..8a62c8d0380 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,106 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-tuple-type Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [4, 13], + loc: { + start: { column: 4, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "[", + + range: [14, 15], + loc: { + start: { column: 14, line: 1 }, + end: { column: 15, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [15, 16], + loc: { + start: { column: 15, line: 1 }, + end: { column: 16, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [16, 17], + loc: { + start: { column: 16, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "2", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ",", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "3", + + range: [21, 22], + loc: { + start: { column: 21, line: 1 }, + end: { column: 22, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "]", + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [23, 24], + loc: { + start: { column: 23, line: 1 }, + end: { column: 24, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..eb993d611eb --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-tuple-type AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..3f0aa9841e8 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/identifier-tuple-type/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression identifier-tuple-type AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/fixture.ts new file mode 100644 index 00000000000..09a4c612e30 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/fixture.ts @@ -0,0 +1 @@ +foo === 1 satisfies number; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..f80151c9032 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-no-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: BinaryExpression { + type: "BinaryExpression", + left: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + operator: "===", + right: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [20, 26], + loc: { + start: { column: 20, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [8, 26], + loc: { + start: { column: 8, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [0, 26], + loc: { + start: { column: 0, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [0, 27], + loc: { + start: { column: 0, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 28], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..5391022e27f --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-no-parentheses TSESTree - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "===", + + range: [4, 7], + loc: { + start: { column: 4, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [10, 19], + loc: { + start: { column: 10, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [20, 26], + loc: { + start: { column: 20, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [26, 27], + loc: { + start: { column: 26, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..60189a70358 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-no-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: BinaryExpression { + type: "BinaryExpression", + left: Identifier { + type: "Identifier", + name: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + operator: "===", + right: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [20, 26], + loc: { + start: { column: 20, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [8, 26], + loc: { + start: { column: 8, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [0, 26], + loc: { + start: { column: 0, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + + range: [0, 27], + loc: { + start: { column: 0, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 28], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..cac159f58dc --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-no-parentheses Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "foo", + + range: [0, 3], + loc: { + start: { column: 0, line: 1 }, + end: { column: 3, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "===", + + range: [4, 7], + loc: { + start: { column: 4, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [10, 19], + loc: { + start: { column: 10, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [20, 26], + loc: { + start: { column: 20, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [26, 27], + loc: { + start: { column: 26, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..a21b35204c9 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-no-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..6a3c807848a --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-no-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-no-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/fixture.ts new file mode 100644 index 00000000000..a93f5746e7c --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/fixture.ts @@ -0,0 +1 @@ +(foo === 1) satisfies boolean; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..4401893b67e --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-with-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: BinaryExpression { + type: "BinaryExpression", + left: Identifier { + type: "Identifier", + name: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + operator: "===", + right: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [9, 10], + loc: { + start: { column: 9, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + + range: [1, 10], + loc: { + start: { column: 1, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + typeAnnotation: TSBooleanKeyword { + type: "TSBooleanKeyword", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [0, 29], + loc: { + start: { column: 0, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [0, 30], + loc: { + start: { column: 0, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..7034fce1187 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-with-parentheses TSESTree - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "===", + + range: [5, 8], + loc: { + start: { column: 5, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [9, 10], + loc: { + start: { column: 9, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [12, 21], + loc: { + start: { column: 12, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "boolean", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [29, 30], + loc: { + start: { column: 29, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..fb10fc5442e --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-with-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: BinaryExpression { + type: "BinaryExpression", + left: Identifier { + type: "Identifier", + name: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + operator: "===", + right: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [9, 10], + loc: { + start: { column: 9, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + + range: [1, 10], + loc: { + start: { column: 1, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + typeAnnotation: TSBooleanKeyword { + type: "TSBooleanKeyword", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [0, 29], + loc: { + start: { column: 0, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + + range: [0, 30], + loc: { + start: { column: 0, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 31], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..4c73b5cc818 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-with-parentheses Babel - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "===", + + range: [5, 8], + loc: { + start: { column: 5, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [9, 10], + loc: { + start: { column: 9, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [12, 21], + loc: { + start: { column: 12, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "boolean", + + range: [22, 29], + loc: { + start: { column: 22, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [29, 30], + loc: { + start: { column: 29, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..28594822212 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-with-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..b6881fd10cf --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/logical-with-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression logical-with-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/fixture.ts new file mode 100644 index 00000000000..ec7b71c8e2b --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/fixture.ts @@ -0,0 +1 @@ +({ prop: 'string' }) satisfies { prop: string }; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..1ed0e662a99 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,128 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-inner-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ObjectExpression { + type: "ObjectExpression", + properties: Array [ + Property { + type: "Property", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + kind: "init", + method: false, + shorthand: false, + value: Literal { + type: "Literal", + raw: "'string'", + value: "string", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [3, 17], + loc: { + start: { column: 3, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + ], + + range: [1, 19], + loc: { + start: { column: 1, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + typeAnnotation: TSTypeLiteral { + type: "TSTypeLiteral", + members: Array [ + TSPropertySignature { + type: "TSPropertySignature", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [33, 37], + loc: { + start: { column: 33, line: 1 }, + end: { column: 37, line: 1 }, + }, + }, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSStringKeyword { + type: "TSStringKeyword", + + range: [39, 45], + loc: { + start: { column: 39, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + + range: [37, 45], + loc: { + start: { column: 37, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + + range: [33, 45], + loc: { + start: { column: 33, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + ], + + range: [31, 47], + loc: { + start: { column: 31, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + + range: [0, 47], + loc: { + start: { column: 0, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + + range: [0, 48], + loc: { + start: { column: 0, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 49], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..99f068a424b --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,146 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-inner-parentheses TSESTree - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + String { + type: "String", + value: "'string'", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [21, 30], + loc: { + start: { column: 21, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [31, 32], + loc: { + start: { column: 31, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [33, 37], + loc: { + start: { column: 33, line: 1 }, + end: { column: 37, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [37, 38], + loc: { + start: { column: 37, line: 1 }, + end: { column: 38, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "string", + + range: [39, 45], + loc: { + start: { column: 39, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [46, 47], + loc: { + start: { column: 46, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [47, 48], + loc: { + start: { column: 47, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..c5868aaf0d1 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,128 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-inner-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ObjectExpression { + type: "ObjectExpression", + properties: Array [ + Property { + type: "Property", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + kind: "init", + method: false, + shorthand: false, + value: Literal { + type: "Literal", + raw: "'string'", + value: "string", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [3, 17], + loc: { + start: { column: 3, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + ], + + range: [1, 19], + loc: { + start: { column: 1, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + typeAnnotation: TSTypeLiteral { + type: "TSTypeLiteral", + members: Array [ + TSPropertySignature { + type: "TSPropertySignature", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [33, 37], + loc: { + start: { column: 33, line: 1 }, + end: { column: 37, line: 1 }, + }, + }, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSStringKeyword { + type: "TSStringKeyword", + + range: [39, 45], + loc: { + start: { column: 39, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + + range: [37, 45], + loc: { + start: { column: 37, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + + range: [33, 45], + loc: { + start: { column: 33, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + ], + + range: [31, 47], + loc: { + start: { column: 31, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + + range: [0, 47], + loc: { + start: { column: 0, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + + range: [0, 48], + loc: { + start: { column: 0, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 49], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..128fc9c6128 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,146 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-inner-parentheses Babel - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + String { + type: "String", + value: "'string'", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [21, 30], + loc: { + start: { column: 21, line: 1 }, + end: { column: 30, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [31, 32], + loc: { + start: { column: 31, line: 1 }, + end: { column: 32, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [33, 37], + loc: { + start: { column: 33, line: 1 }, + end: { column: 37, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [37, 38], + loc: { + start: { column: 37, line: 1 }, + end: { column: 38, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "string", + + range: [39, 45], + loc: { + start: { column: 39, line: 1 }, + end: { column: 45, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [46, 47], + loc: { + start: { column: 46, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [47, 48], + loc: { + start: { column: 47, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..bad308efe92 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-inner-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..92a052f3254 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-inner-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-inner-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/fixture.ts b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/fixture.ts new file mode 100644 index 00000000000..b7726f7f140 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/fixture.ts @@ -0,0 +1 @@ +({ prop: 'string' } satisfies { prop: string }); diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..9100755681a --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,128 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-outer-parentheses TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ObjectExpression { + type: "ObjectExpression", + properties: Array [ + Property { + type: "Property", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + kind: "init", + method: false, + shorthand: false, + value: Literal { + type: "Literal", + raw: "'string'", + value: "string", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [3, 17], + loc: { + start: { column: 3, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + ], + + range: [1, 19], + loc: { + start: { column: 1, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + typeAnnotation: TSTypeLiteral { + type: "TSTypeLiteral", + members: Array [ + TSPropertySignature { + type: "TSPropertySignature", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [32, 36], + loc: { + start: { column: 32, line: 1 }, + end: { column: 36, line: 1 }, + }, + }, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSStringKeyword { + type: "TSStringKeyword", + + range: [38, 44], + loc: { + start: { column: 38, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + + range: [36, 44], + loc: { + start: { column: 36, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + + range: [32, 44], + loc: { + start: { column: 32, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + ], + + range: [30, 46], + loc: { + start: { column: 30, line: 1 }, + end: { column: 46, line: 1 }, + }, + }, + + range: [1, 46], + loc: { + start: { column: 1, line: 1 }, + end: { column: 46, line: 1 }, + }, + }, + + range: [0, 48], + loc: { + start: { column: 0, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 49], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..388f2790bb0 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,146 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-outer-parentheses TSESTree - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + String { + type: "String", + value: "'string'", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [20, 29], + loc: { + start: { column: 20, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [30, 31], + loc: { + start: { column: 30, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [32, 36], + loc: { + start: { column: 32, line: 1 }, + end: { column: 36, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [36, 37], + loc: { + start: { column: 36, line: 1 }, + end: { column: 37, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "string", + + range: [38, 44], + loc: { + start: { column: 38, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [45, 46], + loc: { + start: { column: 45, line: 1 }, + end: { column: 46, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [46, 47], + loc: { + start: { column: 46, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [47, 48], + loc: { + start: { column: 47, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..16adf4fa64a --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/3-Babel-AST.shot @@ -0,0 +1,128 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-outer-parentheses Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ExpressionStatement { + type: "ExpressionStatement", + expression: TSSatisfiesExpression { + type: "TSSatisfiesExpression", + expression: ObjectExpression { + type: "ObjectExpression", + properties: Array [ + Property { + type: "Property", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + kind: "init", + method: false, + shorthand: false, + value: Literal { + type: "Literal", + raw: "'string'", + value: "string", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + + range: [3, 17], + loc: { + start: { column: 3, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + ], + + range: [1, 19], + loc: { + start: { column: 1, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + typeAnnotation: TSTypeLiteral { + type: "TSTypeLiteral", + members: Array [ + TSPropertySignature { + type: "TSPropertySignature", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [32, 36], + loc: { + start: { column: 32, line: 1 }, + end: { column: 36, line: 1 }, + }, + }, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSStringKeyword { + type: "TSStringKeyword", + + range: [38, 44], + loc: { + start: { column: 38, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + + range: [36, 44], + loc: { + start: { column: 36, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + + range: [32, 44], + loc: { + start: { column: 32, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + ], + + range: [30, 46], + loc: { + start: { column: 30, line: 1 }, + end: { column: 46, line: 1 }, + }, + }, + + range: [1, 46], + loc: { + start: { column: 1, line: 1 }, + end: { column: 46, line: 1 }, + }, + }, + + range: [0, 48], + loc: { + start: { column: 0, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, + ], + sourceType: "script", + + range: [0, 49], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, +} +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..bdca107f453 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,146 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-outer-parentheses Babel - Tokens 1`] = ` +Array [ + Punctuator { + type: "Punctuator", + value: "(", + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [1, 2], + loc: { + start: { column: 1, line: 1 }, + end: { column: 2, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [3, 7], + loc: { + start: { column: 3, line: 1 }, + end: { column: 7, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [7, 8], + loc: { + start: { column: 7, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + String { + type: "String", + value: "'string'", + + range: [9, 17], + loc: { + start: { column: 9, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [18, 19], + loc: { + start: { column: 18, line: 1 }, + end: { column: 19, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "satisfies", + + range: [20, 29], + loc: { + start: { column: 20, line: 1 }, + end: { column: 29, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [30, 31], + loc: { + start: { column: 30, line: 1 }, + end: { column: 31, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [32, 36], + loc: { + start: { column: 32, line: 1 }, + end: { column: 36, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [36, 37], + loc: { + start: { column: 36, line: 1 }, + end: { column: 37, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "string", + + range: [38, 44], + loc: { + start: { column: 38, line: 1 }, + end: { column: 44, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [45, 46], + loc: { + start: { column: 45, line: 1 }, + end: { column: 46, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ")", + + range: [46, 47], + loc: { + start: { column: 46, line: 1 }, + end: { column: 47, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [47, 48], + loc: { + start: { column: 47, line: 1 }, + end: { column: 48, line: 1 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..982ccda73a2 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-outer-parentheses AST Alignment - AST 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..c113b8be7e9 --- /dev/null +++ b/packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/object-object-outer-parentheses/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures expression TSSatisfiesExpression object-object-outer-parentheses AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/tests/fixtures-with-differences-ast.shot b/packages/ast-spec/tests/fixtures-with-differences-ast.shot index 9d3e5d88ccc..beff8134d6e 100644 --- a/packages/ast-spec/tests/fixtures-with-differences-ast.shot +++ b/packages/ast-spec/tests/fixtures-with-differences-ast.shot @@ -24,5 +24,6 @@ Set { "declaration/TSInterfaceDeclaration/fixtures/type-param-one/fixture.ts", "declaration/TSTypeAliasDeclaration/fixtures/type-param-many/fixture.ts", "declaration/TSTypeAliasDeclaration/fixtures/type-param-one/fixture.ts", + "expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/fixture.ts", } `; diff --git a/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts b/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts deleted file mode 100644 index 54953f1a7f9..00000000000 --- a/packages/shared-fixtures/fixtures/typescript/expressions/satisfies-expression.src.ts +++ /dev/null @@ -1,11 +0,0 @@ -x satisfies T; -x < y satisfies boolean; // (x < y) satisfies boolean; -x === 1 satisfies number; // x === (1 satisfies number); -x satisfies any satisfies T; - -const t2 = { a: 1, b: 1 } satisfies I1; // Error -const t3 = { } satisfies I1; // Error -const t4: T1 = { a: "a" } satisfies T1; // Ok -const t5 = (m => m.substring(0)) satisfies T2; // Ok -const t6 = [1, 2] satisfies [number, number]; -const t7 = (async (context) => context.value) satisfies (context: { value: string }) => Promise; diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index d1f22d27eb9..204da250a86 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -2652,8 +2652,6 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/optional-call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/satisfies-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/tagged-template-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot deleted file mode 100644 index 099d606a868..00000000000 --- a/packages/typescript-estree/tests/snapshots/typescript/expressions/satisfies-expression.src.ts.shot +++ /dev/null @@ -1,4117 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript expressions satisfies-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 13, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 14, - ], - "type": "ExpressionStatement", - }, - Object { - "expression": Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "operator": "<", - "range": Array [ - 15, - 20, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "y", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 38, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "TSBooleanKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 39, - ], - "type": "ExpressionStatement", - }, - Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "name": "x", - "range": Array [ - 70, - 71, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "operator": "===", - "range": Array [ - 70, - 94, - ], - "right": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 76, - 94, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 88, - 94, - ], - "type": "TSNumberKeyword", - }, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 70, - 95, - ], - "type": "ExpressionStatement", - }, - Object { - "expression": Object { - "expression": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "name": "x", - "range": Array [ - 127, - 128, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 127, - 142, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 139, - 142, - ], - "type": "TSAnyKeyword", - }, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 127, - 154, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 153, - 154, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "name": "T", - "range": Array [ - 153, - 154, - ], - "type": "Identifier", - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 127, - 155, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "name": "t2", - "range": Array [ - 163, - 165, - ], - "type": "Identifier", - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "name": "a", - "range": Array [ - 170, - 171, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 170, - 174, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 173, - 174, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "name": "b", - "range": Array [ - 176, - 177, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 176, - 180, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 179, - 180, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - }, - ], - "range": Array [ - 168, - 182, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 168, - 195, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 36, - "line": 6, - }, - }, - "range": Array [ - 193, - 195, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 36, - "line": 6, - }, - }, - "name": "I1", - "range": Array [ - 193, - 195, - ], - "type": "Identifier", - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 163, - 195, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 39, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 157, - 196, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "t3", - "range": Array [ - 212, - 214, - ], - "type": "Identifier", - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "properties": Array [], - "range": Array [ - 217, - 220, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 217, - 233, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "range": Array [ - 231, - 233, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "name": "I1", - "range": Array [ - 231, - 233, - ], - "type": "Identifier", - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 212, - 233, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 28, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 206, - 234, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "name": "t4", - "range": Array [ - 250, - 256, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 252, - 256, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 254, - 256, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "name": "T1", - "range": Array [ - 254, - 256, - ], - "type": "Identifier", - }, - "typeParameters": undefined, - }, - }, - }, - "init": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "name": "a", - "range": Array [ - 261, - 262, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "method": false, - "range": Array [ - 261, - 267, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 20, - "line": 8, - }, - }, - "range": Array [ - 264, - 267, - ], - "raw": "\\"a\\"", - "type": "Literal", - "value": "a", - }, - }, - ], - "range": Array [ - 259, - 269, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 259, - 282, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 8, - }, - "start": Object { - "column": 36, - "line": 8, - }, - }, - "range": Array [ - 280, - 282, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 8, - }, - "start": Object { - "column": 36, - "line": 8, - }, - }, - "name": "T1", - "range": Array [ - 280, - 282, - ], - "type": "Identifier", - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "range": Array [ - 250, - 282, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 39, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 244, - 283, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "name": "t5", - "range": Array [ - 296, - 298, - ], - "type": "Identifier", - }, - "init": Object { - "expression": Object { - "async": false, - "body": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 9, - }, - "start": Object { - "column": 29, - "line": 9, - }, - }, - "range": Array [ - 319, - 320, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 28, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": "m", - "range": Array [ - 307, - 308, - ], - "type": "Identifier", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "name": "substring", - "range": Array [ - 309, - 318, - ], - "type": "Identifier", - }, - "range": Array [ - 307, - 318, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "optional": false, - "range": Array [ - 307, - 321, - ], - "type": "CallExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "name": "m", - "range": Array [ - 302, - 303, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 302, - 321, - ], - "type": "ArrowFunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 301, - 335, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "range": Array [ - 333, - 335, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "name": "T2", - "range": Array [ - 333, - 335, - ], - "type": "Identifier", - }, - "typeParameters": undefined, - }, - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 296, - 335, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 46, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 290, - 336, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "name": "t6", - "range": Array [ - 349, - 351, - ], - "type": "Identifier", - }, - "init": Object { - "expression": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 10, - }, - }, - "range": Array [ - 355, - 356, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 10, - }, - }, - "range": Array [ - 358, - 359, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "range": Array [ - 354, - 360, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "range": Array [ - 354, - 387, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "elementTypes": Array [ - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 10, - }, - "start": Object { - "column": 29, - "line": 10, - }, - }, - "range": Array [ - 372, - 378, - ], - "type": "TSNumberKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 10, - }, - "start": Object { - "column": 37, - "line": 10, - }, - }, - "range": Array [ - 380, - 386, - ], - "type": "TSNumberKeyword", - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 10, - }, - "start": Object { - "column": 28, - "line": 10, - }, - }, - "range": Array [ - 371, - 387, - ], - "type": "TSTupleType", - }, - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "range": Array [ - 349, - 387, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 45, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 10, - }, - }, - "range": Array [ - 343, - 388, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "name": "t7", - "range": Array [ - 395, - 397, - ], - "type": "Identifier", - }, - "init": Object { - "expression": Object { - "async": true, - "body": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 44, - "line": 11, - }, - "start": Object { - "column": 31, - "line": 11, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 11, - }, - "start": Object { - "column": 31, - "line": 11, - }, - }, - "name": "context", - "range": Array [ - 420, - 427, - ], - "type": "Identifier", - }, - "optional": false, - "property": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 11, - }, - "start": Object { - "column": 39, - "line": 11, - }, - }, - "name": "value", - "range": Array [ - 428, - 433, - ], - "type": "Identifier", - }, - "range": Array [ - 420, - 433, - ], - "type": "MemberExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 44, - "line": 11, - }, - "start": Object { - "column": 12, - "line": 11, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 19, - "line": 11, - }, - }, - "name": "context", - "range": Array [ - 408, - 415, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 401, - 433, - ], - "type": "ArrowFunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 103, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 11, - }, - }, - "range": Array [ - 400, - 492, - ], - "type": "TSSatisfiesExpression", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 103, - "line": 11, - }, - "start": Object { - "column": 56, - "line": 11, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 11, - }, - "start": Object { - "column": 57, - "line": 11, - }, - }, - "name": "context", - "range": Array [ - 446, - 472, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 11, - }, - "start": Object { - "column": 64, - "line": 11, - }, - }, - "range": Array [ - 453, - 472, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 11, - }, - "start": Object { - "column": 66, - "line": 11, - }, - }, - "members": Array [ - Object { - "computed": false, - "export": undefined, - "initializer": undefined, - "key": Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 11, - }, - "start": Object { - "column": 68, - "line": 11, - }, - }, - "name": "value", - "range": Array [ - 457, - 462, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 81, - "line": 11, - }, - "start": Object { - "column": 68, - "line": 11, - }, - }, - "optional": undefined, - "range": Array [ - 457, - 470, - ], - "readonly": undefined, - "static": undefined, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 81, - "line": 11, - }, - "start": Object { - "column": 73, - "line": 11, - }, - }, - "range": Array [ - 462, - 470, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 81, - "line": 11, - }, - "start": Object { - "column": 75, - "line": 11, - }, - }, - "range": Array [ - 464, - 470, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 455, - 472, - ], - "type": "TSTypeLiteral", - }, - }, - }, - ], - "range": Array [ - 445, - 492, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 103, - "line": 11, - }, - "start": Object { - "column": 85, - "line": 11, - }, - }, - "range": Array [ - 474, - 492, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 103, - "line": 11, - }, - "start": Object { - "column": 88, - "line": 11, - }, - }, - "range": Array [ - 477, - 492, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 95, - "line": 11, - }, - "start": Object { - "column": 88, - "line": 11, - }, - }, - "name": "Promise", - "range": Array [ - 477, - 484, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 103, - "line": 11, - }, - "start": Object { - "column": 95, - "line": 11, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 102, - "line": 11, - }, - "start": Object { - "column": 96, - "line": 11, - }, - }, - "range": Array [ - 485, - 491, - ], - "type": "TSStringKeyword", - }, - ], - "range": Array [ - 484, - 492, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - "type": "TSFunctionType", - }, - }, - "loc": Object { - "end": Object { - "column": 103, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "range": Array [ - 395, - 492, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 104, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 11, - }, - }, - "range": Array [ - 389, - 493, - ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 40, - 69, - ], - "type": "Line", - "value": " (x < y) satisfies boolean;", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 96, - 126, - ], - "type": "Line", - "value": " x === (1 satisfies number);", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 6, - }, - "start": Object { - "column": 40, - "line": 6, - }, - }, - "range": Array [ - 197, - 205, - ], - "type": "Line", - "value": " Error", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 7, - }, - }, - "range": Array [ - 235, - 243, - ], - "type": "Line", - "value": " Error", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 8, - }, - "start": Object { - "column": 40, - "line": 8, - }, - }, - "range": Array [ - 284, - 289, - ], - "type": "Line", - "value": " Ok", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 9, - }, - "start": Object { - "column": 47, - "line": 9, - }, - }, - "range": Array [ - 337, - 342, - ], - "type": "Line", - "value": " Ok", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 12, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 494, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 11, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 21, - 30, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 31, - 38, - ], - "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 72, - 75, - ], - "type": "Punctuator", - "value": "===", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 76, - 77, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 78, - 87, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "range": Array [ - 88, - 94, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 94, - 95, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 127, - 128, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 129, - 138, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 139, - 142, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 143, - 152, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 153, - 154, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 154, - 155, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 157, - 162, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 6, - "line": 6, - }, - }, - "range": Array [ - 163, - 165, - ], - "type": "Identifier", - "value": "t2", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 166, - 167, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "range": Array [ - 168, - 169, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 6, - }, - }, - "range": Array [ - 170, - 171, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 171, - 172, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 16, - "line": 6, - }, - }, - "range": Array [ - 173, - 174, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 174, - 175, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 176, - 177, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 20, - "line": 6, - }, - }, - "range": Array [ - 177, - 178, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 6, - }, - "start": Object { - "column": 22, - "line": 6, - }, - }, - "range": Array [ - 179, - 180, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 24, - "line": 6, - }, - }, - "range": Array [ - 181, - 182, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 6, - }, - "start": Object { - "column": 26, - "line": 6, - }, - }, - "range": Array [ - 183, - 192, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 6, - }, - "start": Object { - "column": 36, - "line": 6, - }, - }, - "range": Array [ - 193, - 195, - ], - "type": "Identifier", - "value": "I1", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 6, - }, - "start": Object { - "column": 38, - "line": 6, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 206, - 211, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "range": Array [ - 212, - 214, - ], - "type": "Identifier", - "value": "t3", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "range": Array [ - 215, - 216, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 217, - 218, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 13, - "line": 7, - }, - }, - "range": Array [ - 219, - 220, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 7, - }, - }, - "range": Array [ - 221, - 230, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 25, - "line": 7, - }, - }, - "range": Array [ - 231, - 233, - ], - "type": "Identifier", - "value": "I1", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 7, - }, - "start": Object { - "column": 27, - "line": 7, - }, - }, - "range": Array [ - 233, - 234, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 244, - 249, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 6, - "line": 8, - }, - }, - "range": Array [ - 250, - 252, - ], - "type": "Identifier", - "value": "t4", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 252, - 253, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "range": Array [ - 254, - 256, - ], - "type": "Identifier", - "value": "T1", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "range": Array [ - 257, - 258, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "range": Array [ - 259, - 260, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 17, - "line": 8, - }, - }, - "range": Array [ - 261, - 262, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 18, - "line": 8, - }, - }, - "range": Array [ - 262, - 263, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 20, - "line": 8, - }, - }, - "range": Array [ - 264, - 267, - ], - "type": "String", - "value": "\\"a\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 8, - }, - "start": Object { - "column": 24, - "line": 8, - }, - }, - "range": Array [ - 268, - 269, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 8, - }, - "start": Object { - "column": 26, - "line": 8, - }, - }, - "range": Array [ - 270, - 279, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 8, - }, - "start": Object { - "column": 36, - "line": 8, - }, - }, - "range": Array [ - 280, - 282, - ], - "type": "Identifier", - "value": "T1", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 8, - }, - "start": Object { - "column": 38, - "line": 8, - }, - }, - "range": Array [ - 282, - 283, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 290, - 295, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 9, - }, - "start": Object { - "column": 6, - "line": 9, - }, - }, - "range": Array [ - 296, - 298, - ], - "type": "Identifier", - "value": "t5", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 9, - "line": 9, - }, - }, - "range": Array [ - 299, - 300, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 9, - }, - "start": Object { - "column": 11, - "line": 9, - }, - }, - "range": Array [ - 301, - 302, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 302, - 303, - ], - "type": "Identifier", - "value": "m", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 14, - "line": 9, - }, - }, - "range": Array [ - 304, - 306, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 307, - 308, - ], - "type": "Identifier", - "value": "m", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 9, - }, - "start": Object { - "column": 18, - "line": 9, - }, - }, - "range": Array [ - 308, - 309, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 309, - 318, - ], - "type": "Identifier", - "value": "substring", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 9, - }, - "start": Object { - "column": 28, - "line": 9, - }, - }, - "range": Array [ - 318, - 319, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 9, - }, - "start": Object { - "column": 29, - "line": 9, - }, - }, - "range": Array [ - 319, - 320, - ], - "type": "Numeric", - "value": "0", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "range": Array [ - 320, - 321, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 9, - }, - "start": Object { - "column": 31, - "line": 9, - }, - }, - "range": Array [ - 321, - 322, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 9, - }, - "start": Object { - "column": 33, - "line": 9, - }, - }, - "range": Array [ - 323, - 332, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "range": Array [ - 333, - 335, - ], - "type": "Identifier", - "value": "T2", - }, - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 9, - }, - "start": Object { - "column": 45, - "line": 9, - }, - }, - "range": Array [ - 335, - 336, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 10, - }, - }, - "range": Array [ - 343, - 348, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 6, - "line": 10, - }, - }, - "range": Array [ - 349, - 351, - ], - "type": "Identifier", - "value": "t6", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 10, - }, - "start": Object { - "column": 9, - "line": 10, - }, - }, - "range": Array [ - 352, - 353, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "range": Array [ - 354, - 355, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 10, - }, - }, - "range": Array [ - 355, - 356, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 10, - }, - "start": Object { - "column": 13, - "line": 10, - }, - }, - "range": Array [ - 356, - 357, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 10, - }, - }, - "range": Array [ - 358, - 359, - ], - "type": "Numeric", - "value": "2", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 10, - }, - "start": Object { - "column": 16, - "line": 10, - }, - }, - "range": Array [ - 359, - 360, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 10, - }, - "start": Object { - "column": 18, - "line": 10, - }, - }, - "range": Array [ - 361, - 370, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 10, - }, - "start": Object { - "column": 28, - "line": 10, - }, - }, - "range": Array [ - 371, - 372, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 10, - }, - "start": Object { - "column": 29, - "line": 10, - }, - }, - "range": Array [ - 372, - 378, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 10, - }, - "start": Object { - "column": 35, - "line": 10, - }, - }, - "range": Array [ - 378, - 379, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 10, - }, - "start": Object { - "column": 37, - "line": 10, - }, - }, - "range": Array [ - 380, - 386, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 10, - }, - "start": Object { - "column": 43, - "line": 10, - }, - }, - "range": Array [ - 386, - 387, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 10, - }, - "start": Object { - "column": 44, - "line": 10, - }, - }, - "range": Array [ - 387, - 388, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 0, - "line": 11, - }, - }, - "range": Array [ - 389, - 394, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 11, - }, - "start": Object { - "column": 6, - "line": 11, - }, - }, - "range": Array [ - 395, - 397, - ], - "type": "Identifier", - "value": "t7", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 398, - 399, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 11, - }, - }, - "range": Array [ - 400, - 401, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 11, - }, - "start": Object { - "column": 12, - "line": 11, - }, - }, - "range": Array [ - 401, - 406, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 11, - }, - "start": Object { - "column": 18, - "line": 11, - }, - }, - "range": Array [ - 407, - 408, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 19, - "line": 11, - }, - }, - "range": Array [ - 408, - 415, - ], - "type": "Identifier", - "value": "context", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 11, - }, - "start": Object { - "column": 26, - "line": 11, - }, - }, - "range": Array [ - 415, - 416, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 11, - }, - "start": Object { - "column": 28, - "line": 11, - }, - }, - "range": Array [ - 417, - 419, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 11, - }, - "start": Object { - "column": 31, - "line": 11, - }, - }, - "range": Array [ - 420, - 427, - ], - "type": "Identifier", - "value": "context", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 11, - }, - "start": Object { - "column": 38, - "line": 11, - }, - }, - "range": Array [ - 427, - 428, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 11, - }, - "start": Object { - "column": 39, - "line": 11, - }, - }, - "range": Array [ - 428, - 433, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 11, - }, - "start": Object { - "column": 44, - "line": 11, - }, - }, - "range": Array [ - 433, - 434, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 11, - }, - "start": Object { - "column": 46, - "line": 11, - }, - }, - "range": Array [ - 435, - 444, - ], - "type": "Identifier", - "value": "satisfies", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 11, - }, - "start": Object { - "column": 56, - "line": 11, - }, - }, - "range": Array [ - 445, - 446, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 11, - }, - "start": Object { - "column": 57, - "line": 11, - }, - }, - "range": Array [ - 446, - 453, - ], - "type": "Identifier", - "value": "context", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 11, - }, - "start": Object { - "column": 64, - "line": 11, - }, - }, - "range": Array [ - 453, - 454, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 67, - "line": 11, - }, - "start": Object { - "column": 66, - "line": 11, - }, - }, - "range": Array [ - 455, - 456, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 73, - "line": 11, - }, - "start": Object { - "column": 68, - "line": 11, - }, - }, - "range": Array [ - 457, - 462, - ], - "type": "Identifier", - "value": "value", - }, - Object { - "loc": Object { - "end": Object { - "column": 74, - "line": 11, - }, - "start": Object { - "column": 73, - "line": 11, - }, - }, - "range": Array [ - 462, - 463, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 81, - "line": 11, - }, - "start": Object { - "column": 75, - "line": 11, - }, - }, - "range": Array [ - 464, - 470, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 83, - "line": 11, - }, - "start": Object { - "column": 82, - "line": 11, - }, - }, - "range": Array [ - 471, - 472, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 84, - "line": 11, - }, - "start": Object { - "column": 83, - "line": 11, - }, - }, - "range": Array [ - 472, - 473, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 87, - "line": 11, - }, - "start": Object { - "column": 85, - "line": 11, - }, - }, - "range": Array [ - 474, - 476, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 95, - "line": 11, - }, - "start": Object { - "column": 88, - "line": 11, - }, - }, - "range": Array [ - 477, - 484, - ], - "type": "Identifier", - "value": "Promise", - }, - Object { - "loc": Object { - "end": Object { - "column": 96, - "line": 11, - }, - "start": Object { - "column": 95, - "line": 11, - }, - }, - "range": Array [ - 484, - 485, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 102, - "line": 11, - }, - "start": Object { - "column": 96, - "line": 11, - }, - }, - "range": Array [ - 485, - 491, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 103, - "line": 11, - }, - "start": Object { - "column": 102, - "line": 11, - }, - }, - "range": Array [ - 491, - 492, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 104, - "line": 11, - }, - "start": Object { - "column": 103, - "line": 11, - }, - }, - "range": Array [ - 492, - 493, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; diff --git a/yarn.lock b/yarn.lock index 07d19a8fc38..fd624953978 100644 --- a/yarn.lock +++ b/yarn.lock @@ -153,7 +153,7 @@ dependencies: axe-core "^4.4.3" -"@babel/code-frame@*", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.8.3": +"@babel/code-frame@*", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.8.3": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== @@ -165,6 +165,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.3.tgz#707b939793f867f5a73b2666e6d9a3396eb03151" integrity sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw== +"@babel/compat-data@^7.20.0": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" + integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ== + "@babel/core@*", "@babel/core@^7.11.1", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.18.6": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.3.tgz#2519f62a51458f43b682d61583c3810e7dcee64c" @@ -208,7 +213,28 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/eslint-parser@*", "@babel/eslint-parser@^7.18.2": +"@babel/core@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" + integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.20.2" + "@babel/helper-compilation-targets" "^7.20.0" + "@babel/helper-module-transforms" "^7.20.2" + "@babel/helpers" "^7.20.1" + "@babel/parser" "^7.20.2" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.2" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + +"@babel/eslint-parser@*", "@babel/eslint-parser@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.19.1.tgz#4f68f6b0825489e00a24b41b6a1ae35414ecd2f4" integrity sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ== @@ -226,6 +252,15 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.20.1", "@babel/generator@^7.20.2": + version "7.20.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" + integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA== + dependencies: + "@babel/types" "^7.20.2" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -251,6 +286,16 @@ browserslist "^4.21.3" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" + integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== + dependencies: + "@babel/compat-data" "^7.20.0" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.21.3" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.18.6": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.9.tgz#d802ee16a64a9e824fcbf0a2ffc92f19d58550ce" @@ -339,6 +384,20 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" +"@babel/helper-module-transforms@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" + integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.20.2" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.19.1" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.2" + "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" @@ -384,6 +443,13 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-simple-access@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" + integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== + dependencies: + "@babel/types" "^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz#778d87b3a758d90b471e7b9918f34a9a02eb5818" @@ -403,6 +469,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== +"@babel/helper-string-parser@^7.19.4": + version "7.19.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" + integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== + "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" @@ -432,6 +503,15 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" +"@babel/helpers@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" + integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== + dependencies: + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.20.1" + "@babel/types" "^7.20.0" + "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -441,11 +521,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@*", "@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.18.0", "@babel/parser@^7.18.10", "@babel/parser@^7.18.8", "@babel/parser@^7.19.3": +"@babel/parser@*", "@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.8", "@babel/parser@^7.19.3": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a" integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ== +"@babel/parser@^7.20.1", "@babel/parser@^7.20.2", "@babel/parser@^7.20.3": + version "7.20.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" + integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -1207,7 +1292,23 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.18.10", "@babel/types@^7.18.2", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/traverse@^7.20.1": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" + integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.20.1" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.20.1" + "@babel/types" "^7.20.0" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" integrity sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw== @@ -1216,6 +1317,15 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@babel/types@^7.20.0", "@babel/types@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" + integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== + dependencies: + "@babel/helper-string-parser" "^7.19.4" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + "@bcherny/json-schema-ref-parser@9.0.9": version "9.0.9" resolved "https://registry.yarnpkg.com/@bcherny/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#09899d405bc708c0acac0066ae8db5b94d465ca4" From 5419dea31ea23d6d429c5dc7780800468e90b77c Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Fri, 18 Nov 2022 10:48:29 +1030 Subject: [PATCH 16/16] ignore satisfies fixtures from prettier --- .prettierignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.prettierignore b/.prettierignore index 637f32f77bf..88af276a1b2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,6 +12,9 @@ packages/eslint-plugin/src/configs/*.json CONTRIBUTORS.md packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts +# prettier doesn't yet support satisfies +packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/ + # Ignore CHANGELOG.md files to avoid issues with automated release job CHANGELOG.md