components icon indicating copy to clipboard operation
components copied to clipboard

bug(cdk/a11y , material/core): Enabling verbatimModuleSyntax causes error TS2748

Open parapada73 opened this issue 3 years ago • 2 comments

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I have enabled verbatimModuleSyntax introduced in typescript 5.0.

Added "verbatimModuleSyntax": true to tsconfig.json

As a result, an error occurred.

TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled

Reproduction

Steps to reproduce:

  1. Update to Angular 16.
  2. Change to typescript 5.0.4.
  3. Add "verbatimModuleSyntax": true to tsconfig.json .
  4. Build

Expected Behavior

build success !!

Actual Behavior

Error: node_modules/@angular/cdk/a11y/index.d.ts:729:9 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled.

729 FocusMonitorDetectionMode, ~~~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/@angular/material/core/index.d.ts:430:9 - error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled.

430 RippleState, ~~~~~~~~~~~

Environment

  • Angular: 16.0.0
  • CDK/Material: 16.0.0
  • Browser(s): Chrome 113
  • Operating System (e.g. Windows, macOS, Ubuntu): win32 x64

parapada73 avatar May 04 '23 23:05 parapada73

I got a clear answer from @alan-agius4 about using verbatimModuleSyntax. So I will close this issue.

https://github.com/angular/angular/issues/50154#issuecomment-1540002109

parapada73 avatar May 10 '23 05:05 parapada73

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.