1.0.1 • Published 7 years ago

babel-statictype-plugin v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Build Status

install

npm install babel-statictype-plugin

usage

{
    "plugins":["babel-statictype-plugin"]
}


//in your code('xx' is a custom name,also u can catch up with the example)
let Num_xx;   // number
let Str_xx;   //string
let Bool_xx;  // boolean
let Obj_xx;   // object
let Null_xx;  //null
let Und_xx;  //undefined
let Sym_xx;   //Symbol

function foo(Num_a,Str_b){

}

foo(1,'a') // won't throw an error
foo(1,1) // will throw an error,cause second 1 is not a string-type value