Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a problem with writing the interface definition of js-tokens. Please help. #69187

Open
Longqin88888 opened this issue Mar 27, 2024 · 1 comment

Comments

@Longqin88888
Copy link
Contributor

I'm trying to write an interface definition for the 5.0.0 version of the js-tokens library. I've run into a problem that I hope can be solved.
js-tokens uses export.default to export a regular expression. The import method in JS is as follows:
var jsTokens = require("js-tokens").default.
More information can be seen https://github.com/lydell/js-tokens/tree/v5.0.0.

I don't know how to write this interface definition. Can you guide me?

@lydell
Copy link

lydell commented May 7, 2024

What are you trying to achieve? js-tokens already ships with TypeScript types: https://github.com/lydell/js-tokens/blob/56c063d5b69e369e739db0923b501210e6b0401a/index.d.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants