Skip to content

unresolved import errors can't be suppressed with // @ts-expect-error or // @ts-ignore comment #32822

@DetachHead

Description

@DetachHead

Version: Deno 2.7.6

// @ts-expect-error
import { foo } from 'asdfsdf'

foo
> deno check asdf.ts
Check asdf.ts
TS2307 [ERROR]: Import "asdfsdf" not a dependency
  hint: If you want to use the npm package, try running `deno add npm:asdfsdf`
    at file:///C:/Users/user/project/asdf.ts:2:21

error: Type checking failed.

use case: this import is only confitionally available

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions