Dear friend, we, the rest of the NativeScript community really
appreciate your feedback! While we are doing all we can to take care of every
issue, sometimes we get overwhelmed. Because of that, we will consider issues
that are not constructive or problems that cannot be reproduced "dead".
Additionally, we will treat feature requests or bug reports with unanswered
questions regarding the behavior/reproduction for more than 20 days "dead". All
"dead" issues will get closed.
Tried very hard to find anything useful without luck.
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
After changing to es2016 in references.d.ts nothing compiles to JavaScript.
Both
After updating my "references.d.ts" file to use "./node_modules/tns-core-modules/tns-core-modules.es2016.d.ts" none of the tns commands are compiling TypeScript to JavaScript so the app will crash with "Could not find module './'." error.
I want to use "tns-platform-declarations" to marshall native code, as far as I know I need this setup but the documentation has nothing mentioned about it.
Here is my "tsconfig.json"
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"removeComments": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
"lib": [
"es2016"
]
},
"exclude": [
"node_modules",
"platforms",
"**/*.aot.ts"
],
"include": [
"typings-i386/*",
"Interop.d.ts"
]
}
Thank you!
@neonwarp
Apart from the settings in _tsconfig.json_ your _references.d.ts_ should look like this:
/// <reference path="./node_modules/tns-core-modules/tns-core-modules.es2016.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
Here is the README of tns-platform-declarations and here is the article section about enabling IntelliSense in the documentation (not live but in the master of the documentation branch - will go live with or next release). Hope that solves your issue - let me know if you need further assistance!
Thank you for your answer.
I realised if I remove the include ("typings-i386/*", "Interop.d.ts") from tsconfig.json and add "skipLibCheck: true" it will solve all my problems.
However I needed to remove all the platforms, reset the emulators and install everything again.
I had to set skipLibCheck=true, otherwise I saw lots of TS2304 errors during compilation. NS 2.5.0, TS 2.1.6
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Thank you for your answer.
I realised if I remove the include ("typings-i386/*", "Interop.d.ts") from tsconfig.json and add "skipLibCheck: true" it will solve all my problems.
However I needed to remove all the platforms, reset the emulators and install everything again.