-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: accept number and string arrays on set properties
Updated to accept arrays for sets when using Table.new and Table.set methods.
- Loading branch information
1 parent
ae04049
commit 72b57cc
Showing
6 changed files
with
24 additions
and
7 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
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
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,7 +1,13 @@ | ||
import { type NumberSetValue } from '../metadata/attribute-types/number-set.metadata' | ||
import { type StringSetValue } from '../metadata/attribute-types/string-set.metadata' | ||
import { type Table } from '../table' | ||
|
||
export type TableProperty<T> = Exclude<keyof T, keyof Table> | ||
|
||
export type TablePropertyValue<P> = | ||
P extends NumberSetValue ? NumberSetValue : | ||
P extends StringSetValue ? StringSetValue : P | ||
|
||
export type TableProperties<T> = { | ||
[key in TableProperty<T>]?: T[key] | ||
[key in TableProperty<T>]?: TablePropertyValue<T[key]> | ||
} |