Closed boris-petrov closed 1 year ago
Enabling verbatimModuleSyntax in tsconfig.json leads to a bunch of errors:
verbatimModuleSyntax
tsconfig.json
node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:9:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 9 [InternalComponentCapability.DynamicLayout]: WithDynamicLayout; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:10:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 10 [InternalComponentCapability.DynamicTag]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:11:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 11 [InternalComponentCapability.PrepareArgs]: WithPrepareArgs; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:12:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 12 [InternalComponentCapability.CreateArgs]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:13:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 13 [InternalComponentCapability.AttributeHook]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:14:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 14 [InternalComponentCapability.ElementHook]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:15:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 15 [InternalComponentCapability.DynamicScope]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:16:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 16 [InternalComponentCapability.CreateCaller]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:17:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 17 [InternalComponentCapability.UpdateHook]: WithUpdateHook; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:18:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 18 [InternalComponentCapability.CreateInstance]: WithCreateInstance; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:19:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 19 [InternalComponentCapability.Wrapped]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:20:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 20 [InternalComponentCapability.WillDestroy]: InternalComponentManager; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/manager/dist/types/lib/util/capabilities.d.ts:21:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 21 [InternalComponentCapability.HasSubOwner]: WithSubOwner; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@glimmer/runtime/dist/types/lib/vm/low-level.d.ts:5:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 5 [MachineRegister.pc]: number; ~~~~~~~~~~~~~~~ node_modules/@glimmer/runtime/dist/types/lib/vm/low-level.d.ts:6:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 6 [MachineRegister.ra]: number; ~~~~~~~~~~~~~~~ node_modules/@glimmer/runtime/dist/types/lib/vm/low-level.d.ts:7:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 7 [MachineRegister.sp]: number; ~~~~~~~~~~~~~~~ node_modules/@glimmer/runtime/dist/types/lib/vm/low-level.d.ts:8:6 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 8 [MachineRegister.fp]: number; ~~~~~~~~~~~~~~~ node_modules/ember-source/node_modules/@glimmer/syntax/dist/types/lib/source/loc/offset.d.ts:118:21 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 118 readonly kind = OffsetKind.CharPosition; ~~~~~~~~~~ node_modules/ember-source/node_modules/@glimmer/syntax/dist/types/lib/source/loc/offset.d.ts:153:21 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 153 readonly kind = OffsetKind.HbsPosition; ~~~~~~~~~~ node_modules/ember-source/node_modules/@glimmer/syntax/dist/types/lib/source/loc/span.d.ts:176:21 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 176 readonly kind = OffsetKind.CharPosition; ~~~~~~~~~~ node_modules/ember-source/node_modules/@glimmer/syntax/dist/types/lib/source/loc/span.d.ts:198:21 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. 198 readonly kind = OffsetKind.HbsPosition; ~~~~~~~~~~
Repo.
Run npm install and then ./node_modules/.bin/tsc.
npm install
./node_modules/.bin/tsc
Type errors in node_modules.
node_modules
No errors.
cc @chriskrycho
I believe this has been fixed in the newest version of Ember. Thanks!
π Describe the Bug
Enabling
verbatimModuleSyntax
intsconfig.json
leads to a bunch of errors:π¬ Minimal Reproduction
Repo.
Run
npm install
and then./node_modules/.bin/tsc
.π Actual Behavior
Type errors in
node_modules
.π€ Expected Behavior
No errors.
π Environment
cc @chriskrycho