Add @Strong flag
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
export * from './exclude';
|
export * from './exclude';
|
||||||
export * from './memoize';
|
export * from './memoize';
|
||||||
export * from './pluck';
|
export * from './pluck';
|
||||||
|
export * from './strong';
|
||||||
9
src/decorators/strong.ts
Normal file
9
src/decorators/strong.ts
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user