-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chau Tran
authored and
Chau Tran
committed
Aug 16, 2021
1 parent
45edfda
commit f43705a
Showing
3 changed files
with
21 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { PojosMetadataStorage, pojosSymbolStorage } from '../storages'; | ||
|
||
export function exploreMetadata( | ||
metadataStorage: PojosMetadataStorage, | ||
...keys: string[] | ||
) { | ||
keys.forEach((key) => { | ||
if (!metadataStorage.has(key)) { | ||
const metadataList = pojosSymbolStorage.get(Symbol.for(key)); | ||
for (const [propertyKey, metadata] of metadataList) { | ||
metadataStorage.addMetadata(key, [[propertyKey], () => metadata]); | ||
} | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './instantiate.util'; | ||
export * from './explore-metadata.util'; |