简体   繁体   中英

what does references.d.ts file do and where is it located in a NativeScript Project?

i am following this tutorial in nativescript and it states to put

/// <reference path="./node_modules/nativescript-barcodescanner/barcodescanner.d.ts" /> Needed for autocompletion and compilation.

in references.d.ts . my question is what does this file do and where is it located in a nativescript application

The 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 compiler should pull them in automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM