Currently it seems you can only check if the argument is an object, it would be nice to be able to check the properties of an interface. For example, this code should throw an error but it doesn't. And instead it just prints "Hello undefined"
import {CheckParams, Check} from 'runtime-type-checks';
interface Person {
name: string;
age: number;
}
class Test {
constructor() {
}
@CheckParams() Hello(person: Person): string {
return `Hello ${person.name}`
}
}
var instance = new Test();
console.log(instance.Hello(<any>{a: 5}));
Currently it seems you can only check if the argument is an object, it would be nice to be able to check the properties of an interface. For example, this code should throw an error but it doesn't. And instead it just prints "Hello undefined"