New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

typewiz-angular

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typewiz-angular

An Angular Schematic that automatically adds types to TypeScript code using [TypeWiz](https://www.npmjs.com/package/typewiz-core)

latest
Source
npmnpm
Version
1.2.4
Version published
Maintainers
1
Created
Source

typewiz-angular

An Angular Schematic that automatically adds types to TypeScript code using TypeWiz

Build Status Coverage Status

Installation

Run the following command in your project's folder:

ng add typewiz-angular

Usage

Start your project normally, by running ng serve. You should see a new collected-types.json file, which will contain all the new types discovered by TypeWiz. To update your source code with these types, run the following command:

npm run typewiz:apply-types

For more information, check out the blog post.

Example

Given the following input file:

export class AppComponent {
    title = this.greet('World');

    greet(who) {
        return `Hello, ${who}`;
    }
}

After running the app with ng serve, opening it in the browser, and then applying the discovered types by running npm run typewiz:apply-types, your class will be updated as follows:

export class AppComponent {
  title = this.greet('World');

  greet(who: string) {
      return `Hello, ${who}`;
  }
}

Note the addition of the : string type for the who of the greet method.

License

Copyright (C) 2018, Uri Shaked and contributors. Distributed under the terms of the MIT license.

FAQs

Package last updated on 23 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts