runtime-type-checks
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "runtime-type-checks", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Runtime type checks for JavaScript and TypeScript", | ||
@@ -11,2 +11,5 @@ "main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"reflect-metadata": "^0.1.2" | ||
}, | ||
"devDependencies": { | ||
@@ -19,3 +22,2 @@ "jasmine-core": "^2.3.4", | ||
"karma-webpack": "^1.7.0", | ||
"reflect-metadata": "^0.1.2", | ||
"ts-loader": "^0.6.0", | ||
@@ -22,0 +24,0 @@ "tsd": "^0.6.5", |
@@ -128,4 +128,30 @@ # Runtime Type Checks | ||
## How to Install | ||
## How to Use (in TypeScript) | ||
... | ||
Install the module `npm install runtime-type-checks` | ||
Configure TypeScript to emit decorator metadata: | ||
``` | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es5", | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true | ||
}, | ||
"files": [ | ||
"my-app.ts" | ||
] | ||
} | ||
``` | ||
Import from `runtime-type-checks`. | ||
``` | ||
import {CheckParams} from 'runtime-type-checks'; | ||
@CheckParams() | ||
class MyClass { | ||
constructor(a:string) {} | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24026
10
156
1
+ Addedreflect-metadata@^0.1.2
+ Addedreflect-metadata@0.1.14(transitive)