Skip to content

how to define project owned typescript declaration #401

@honwhy

Description

@honwhy

Describe the bug

failed to define project owned typescript declaration

To Reproduce

in content script, import vue sfc file, and in sfc file import 'turndown'

turndown
try to declare module, and add to <rootDir>/tsconfig.json

export {}

declare module 'turndown' {
  export class TurndownService {}
}

in <rootDir>/tsconfig.json,

{
  "extends": "./.wxt/tsconfig.json"
+ "include": ["./global.d.ts"]
}

but results in more typescript errors

Expected behavior

Screenshots

image

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