2

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.

2 Answers 2

6

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.0

Note: It will get better once we have : https://github.com/Microsoft/TypeScript/issues/2338

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.