# @nativescript/types-auto-src

```javascript
npm install @nativescript/types-auto-src
```

## Usage

This package contains parsers which attempt to parse individual swift, java an kotlin files and produce typescript type files compatible with the NativeScript medata generator.  

This approach will have limitations compared with the full `ns types ios|android` approach, but is much quicker.

Example Usage:
* In Visual Studio Code install the Extension [emeraldwalk.RunOnSave](https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave)
* Install globally with `npm i -g @nativescript/types-auto-src`
* Create a new NativeScript Angular app `ns create MyTestApp` 
* In the root of the app run `ns-types-from-source configure`
* This creates the entries in the .vscode/settings.json file which assumes you have the Run on Save extension installed
* Add `src/typings-from-source/**/*d.ts` to the `include` list in `tsconfig.ts`
* Add a swift source file to you project with `ns native add swift MySwiftClass`
* Edit `App_Resources/iOS/src/MySwiftClass.swift` adding functions etc.
* When you save your file a types file will be created in `src/typings-from-source/ios`
* Intellisense should reflect your changes to the swift file.



## License

Apache License Version 2.0
