Skip to content

TypeScript error when importing TypeScriptΒ #48504

@bbrk24

Description

@bbrk24

Bug Report

πŸ”Ž Search Terms

LanguageServiceHost useCaseSensitiveFileNames

πŸ•— Version & Regression Information

  • This changed between versions 4.7.0-dev.20220311 and 4.7.0-dev.20220312

⏯ Playground Link

N/A, requires import statement which isn't possible in the playground

πŸ’» Code

import * as ts from 'typescript';

Yep, that's it.

πŸ™ Actual behavior

The following error is generated:

node_modules/typescript/lib/typescript.d.ts:5716:15 - error TS2430: Interface 'LanguageServiceHost' incorrectly extends interface 'MinimalResolutionCacheHost'.  Types of property 'useCaseSensitiveFileNames' are incompatible.
    Type '(() => boolean) | undefined' is not assignable to type 'boolean | (() => boolean)'.
      Type 'undefined' is not assignable to type 'boolean | (() => boolean)'.

5716     interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost {
                   ~~~~~~~~~~~~~~~~~~~


Found 1 error in node_modules/typescript/lib/typescript.d.ts:5716

πŸ™‚ Expected behavior

TypeScript should compile without errors.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: APIRelates to the public API for TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions