Skip to content

Commit e8005b2

Browse files
Adding TS mention
1 parent eb51066 commit e8005b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This plugin provides client-side integration for the [CodePush service](http://c
2020
* [Debugging / Troubleshooting](#debugging--troubleshooting)
2121
* [Example Apps / Starters](#example-apps--starters)
2222
* [Continuous Integration / Delivery](#continuous-integration--delivery)
23+
* [TypeScript Consumption](#typeScript-consumption)
2324

2425
## How does it work?
2526

@@ -1144,6 +1145,10 @@ In addition to being able to use the CodePush CLI to "manually" release updates,
11441145
11451146
Additionally, if you'd like more details of what a complete mobile CI/CD workflow can look like, which includes CodePush, check out this [excellent article](https://zeemee.engineering/zeemee-engineering-and-the-quest-for-the-holy-mobile-dev-grail-1310be4953d1#.zfwaxtbco) by the [ZeeMee engineering team](https://zeemee.engineering).
11461147
1148+
## TypeScript Consumption
1149+
1150+
This module ships its `*.d.ts` file as part of its NPM package, which allows you to simply `import` it, and receive intellisense in supporting editors (e.g. Visual Studio Code), as well as compile-time type checking if you're using TypeScript. For the most part, this behavior should just work out of the box, however, if you've specified `es6` as the value for either the `target` or `module` [compiler option](http://www.typescriptlang.org/docs/handbook/compiler-options.html) in your [`tsconfig.json`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file, then just make sure that you also set the `moduleResolution` option to `node`. This ensures that the TypeScript compiler will look within the `node_modules` for the type definitions of imported modules. Otherwise, you'll get an error like the following: `error TS2307: Cannot find module 'react-native-code-push'`.
1151+
11471152
---
11481153
11491154
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

0 commit comments

Comments
 (0)