Skip to content

Declaration Files missing for typescript project #4

@junwen-k

Description

@junwen-k

Issue

Typescript declaration (d.ts) missing resulting compiler error when using Typescript.

Could not find a declaration file for module '@sketchfab/viewer-api'. '/node_modules/@sketchfab/viewer-api/viewer-api.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/sketchfab__viewer-api` if it exists or add a new declaration (.d.ts) file containing `declare module '@sketchfab/viewer-api';`ts(7016)

Solution

In order to properly support typescript, we need to add type declaration for this library to fix compiler error and type check.

Workaround

Add // ts-ignore before import line to omit type check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions