Skip to content

albertzzy/babel-statictype-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-statictype-plugin

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published