generated from CodelyTV/typescript-basic-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add unknown properties support (#11)
* test: add Metadata class and test for inferring primitive properties from metadata * fix: update ValueObjectValue type to handle unknown key properties * test: refine title test case to infer properties with unknown type * chore: update package version Co-authored-by: Javier Ferrer González <javier.ferrer@codely.com>
- Loading branch information
1 parent
f11bad7
commit 617e4df
Showing
5 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,11 @@ | ||
import { Primitives } from "../src"; | ||
|
||
export class Metadata { | ||
constructor(public readonly data: Record<string, unknown>) {} | ||
|
||
toPrimitives(): Primitives<Metadata> { | ||
return { | ||
data: this.data, | ||
}; | ||
} | ||
} |
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