Преглед на файлове

sdk/js-query: Generate declaration files

Kevin Peters преди 2 години
родител
ревизия
5c4ac61f79
променени са 4 файла, в които са добавени 10 реда и са изтрити 2 реда
  1. 2 1
      sdk/js-query/package.json
  2. 0 0
      sdk/js-query/tsconfig.cjs.json
  3. 0 1
      sdk/js-query/tsconfig.json
  4. 8 0
      sdk/js-query/tsconfig.types.json

+ 2 - 1
sdk/js-query/package.json

@@ -5,12 +5,13 @@
   "homepage": "https://wormhole.com",
   "main": "./lib/cjs/index.js",
   "module": "./lib/esm/index.js",
+  "types": "./lib/types/index.d.ts",
   "files": [
     "lib/"
   ],
   "scripts": {
     "test": "jest --verbose",
-    "build": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json"
+    "build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && tsc -p tsconfig.types.json"
   },
   "keywords": [
     "wormhole",

+ 0 - 0
sdk/js-query/tsconfig-cjs.json → sdk/js-query/tsconfig.cjs.json


+ 0 - 1
sdk/js-query/tsconfig.json

@@ -3,7 +3,6 @@
     "target": "es6",
     "module": "esnext",
     "moduleResolution": "node",
-    "declaration": true,
     "outDir": "./lib/esm",
     "strict": true,
     "esModuleInterop": true,

+ 8 - 0
sdk/js-query/tsconfig.types.json

@@ -0,0 +1,8 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "declarationDir": "./lib/types",
+    "declaration": true,
+    "emitDeclarationOnly": true
+  }
+}