Can someone give me a detail steps how to setup typescript environment for nativescript?
lets say import fooModule = require('ui/image');
won't give me a red underline and error while compiling.
Can someone give me a detail steps how to setup typescript environment for nativescript?
lets say import fooModule = require('ui/image');
won't give me a red underline and error while compiling.
As of NativeScript version 1.5, TypeScript is really easy to set up just by running
tns install typescript
inside your project directory. Here is a video on how to get set up: Hello World native iOS mobile app using TypeScript and NativeScript
They ship with typescript definitions as
tns-definitions-*.tgz
that you need to extract and include in your project. Download is available from releases page e.g. https://github.com/NativeScript/NativeScript/releases/tag/v1.1.0Note: It will get better once we have : https://github.com/Microsoft/TypeScript/issues/2338