Skip to content

It's not possible to use this library as a typescript module #1

Description

@denisfalqueto

I'm trying to use this library in a Vite build, with vanillajs template, using typescript. If I npm install this library, I can't import it in this way:

import { Hat } from 'hatjs';
tsc && vite build

gies:


> metronomo@0.0.0 build
> tsc && vite build

src/main.ts:1:21 - error TS2307: Cannot find module 'hatjs' or its corresponding type declarations.

1 import { Hat } from 'hatjs';
                      ~~~~~~~

What struck me as funny is that I can use RawJS in that same way without any problems.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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