Skip to content

Commit e21d26f

Browse files
Gozalarvagg
authored andcommitted
fix: types mapping
- "*" match seems to cause multiple path substitutions microsoft/TypeScript#41284 that packge name prefix seems to resolve - add types field which acts as main in TS
1 parent d713b14 commit e21d26f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.0-dev",
44
"description": "Interface for multihash, multicodec, multibase and CID",
55
"main": "./src/index.js",
6+
"types": "./types/index.d.ts",
67
"type": "module",
78
"scripts": {
89
"build": "npm run build:js && npm run build:types",
@@ -118,11 +119,8 @@
118119
"homepage": "https://github.com/multiformats/js-multiformats#readme",
119120
"typesVersions": {
120121
"*": {
121-
"*": [
122+
"multiformats/*": [
122123
"types/*"
123-
],
124-
"cjs/src/index.js": [
125-
"types/index.d.ts"
126124
]
127125
}
128126
}

0 commit comments

Comments
 (0)