Skip to content

Commit

Permalink
feat(MetaData): add clear method for MetaData
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley Overdijk committed Apr 10, 2018
1 parent 4c93545 commit 4cdc486
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/MetaData.ts
Expand Up @@ -35,6 +35,15 @@ export class MetaData {
return MetaData.metaMap.get(target);
}

/**
* Clear the MetaData for provided targets.
*
* @param {*} targets
*/
static clear(...targets: any[]): void {
targets.forEach(target => MetaData.metaMap.delete(MetaData.getConstructor(target)));
}

/**
* Get metadata for provided target (accepts instance).
*
Expand Down

0 comments on commit 4cdc486

Please sign in to comment.