admin管理员组文章数量:1430083
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.
版权声明:本文标题:javascript - what does references.d.ts file do and where is it located in a NativeScript Project? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745453016a2658974.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论