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 c6c8270 commit b346d2d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 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": "dist/browser.d.ts",
"globalName": "analyticsIntercom",
"jsnext:main": "lib/analytics-plugin-intercom.es.js",
"module": "lib/analytics-plugin-intercom.es.js",
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 b346d2d

Please sign in to comment.