This package is made with JavaScript, but since DT or .d.ts does not exist, it was not possible to use it with TypeScript.
When I try to use it in TypeScript I get the following error:
Cannot find module '@twemoji/parser' or its corresponding type declarations.ts(2307)
Problem
This package is made with JavaScript, but since DT or
.d.ts
does not exist, it was not possible to use it with TypeScript. When I try to use it in TypeScript I get the following error:Solution
This PR adds
index.d.ts
and make changes to thetypes
andfiles
fields ofpackage.json
Result
This adds a type definition, so it can be used more safely in TypeScript.