Skip to content

Commit

Permalink
docs(intercom): refactored types generation
Browse files Browse the repository at this point in the history
Have set the default types to the browser types

There is currently no way to do isomorphic types

See microsoft/TypeScript#29128
  • Loading branch information
deevus committed Jun 28, 2022
1 parent 6d7a552 commit 27b621f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/analytics-plugin-intercom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
"release:patch": "npm version patch && npm publish",
"release:minor": "npm version minor && npm publish",
"release:major": "npm version major && npm publish",
"es": "../../node_modules/.bin/babel-node ./testBabel.js"
"es": "../../node_modules/.bin/babel-node ./testBabel.js",
"types": "tsc"
},
"main": "lib/analytics-plugin-intercom.cjs.js",
"types": "types/browser.d.ts",
"globalName": "analyticsIntercom",
"jsnext:main": "lib/analytics-plugin-intercom.es.js",
"module": "lib/analytics-plugin-intercom.es.js",
Expand All @@ -40,6 +42,7 @@
"files": [
"dist",
"lib",
"types",
"README.md"
],
"homepage": "https://github.com/DavidWells/analytics#readme",
Expand Down
12 changes: 12 additions & 0 deletions packages/analytics-plugin-intercom/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"compilerOptions": {
"emitDeclarationOnly": true,
"declaration": true,
"allowJs": true,
"declarationDir": "types/"
},
"include": [
"src/**/*.js"
]
}

0 comments on commit 27b621f

Please sign in to comment.