1
0

Add @Strong flag

This commit is contained in:
2020-03-31 16:06:39 -04:00
parent 4fce3d6ab2
commit 457192d9a1
2 changed files with 11 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
export * from './exclude';
export * from './memoize';
export * from './pluck';
export * from './pluck';
export * from './strong';

9
src/decorators/strong.ts Normal file
View File

@@ -0,0 +1,9 @@
export const STRONG_CLASS_KEY = 'serde:strong_class';
export function Strong(): Function {
return function(target: any) {
if (!Reflect.hasMetadata(STRONG_CLASS_KEY, target)) {
Reflect.defineMetadata(STRONG_CLASS_KEY, 'is_strong_typed', target);
}
}
}