@tsdotnet/reflection
v1.1.12
Published
[](https://github.com/tsdotnet/reflection/blob/master/LICENSE)  [;Step 3: validate as many times as you want:
const myItem = {
a: {},
b: 'hello',
c: 1,
d: true,
e: {
f: 'whatever',
g: false,
h: [
0,
true,
'2'
]
},
i: 'noise'
};
// no compile-time type errors!
if (MyTypeValidator.isSubsetOf(myItem)) {
console.log(myItem.e.h.length); // 3
console.log(myItem.b); // "hello"
} else {
throw new TypeError('Invalid type!');
}