Skip to content

The package isn't "TypeScript-ready" as stated in the docs #90

@lukaszarpak

Description

@lukaszarpak

Describe the bug
There aren't any declaration files inside node_modules for this package therefore it doesn't work with Typescript.

To Reproduce
Install the package as described in the docs and try to compile the project with strict flag from TS.

Expected behavior
index.d.ts file should be present inside node_modules/vue-safe-html

Temporary workaround
Add index.d.ts to your vue.js project with following content:

declare module "vue-safe-html" {
  import { Plugin } from "vue";

  declare const plugin: Plugin;
  export default plugin;

  export const allowedTags: string[];
}

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