i am following this tutorial in nativescript and it states to put
/// <reference path="./node_modules/nativescript-barcodescanner/barcodescanner.d.ts" /> Needed for autopletion and pilation.
in references.d.ts . my question is what does this file do and where is it located in a nativescript application
i am following this tutorial in nativescript and it states to put
/// <reference path="./node_modules/nativescript-barcodescanner/barcodescanner.d.ts" /> Needed for autopletion and pilation.
in references.d.ts . my question is what does this file do and where is it located in a nativescript application
Share Improve this question asked Jul 31, 2017 at 12:41 daviddavid 4655 silver badges11 bronze badges 1- 2 *.d.ts files are typescript declarations that allow you to use pure javascript libraries in typescript (e.g jQuery), without having to convert them into type-safe code. The main references.d.ts file is picked up by the tspiler and usually references all other d.ts files. Depending on config the references.d.ts file is usually in the project root. CodePlex have a good basic intro – 83N Commented Jul 31, 2017 at 12:56
1 Answer
Reset to default 5The reference.d.ts file can be added to your project in the root directory, prior to NativeScript 3.0+ it was included in typescript and angular template projects. It is used to add external type definitions to your project such as tns-platform-declarations
. I believe however since that tutorial is a year old you won't need to add the reference.d.ts
file to import those anymore and the typescript piler should pull them in automatically.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745453017a4628358.html
评论列表(0条)