mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 20:24:47 +00:00
wip
This commit is contained in:
@@ -105,7 +105,8 @@ export type ListValueSpecOf<T extends ListValueSpecType> = T extends "string"
|
||||
|
||||
/** represents a spec for a list */
|
||||
export type ValueSpecList = ValueSpecListOf<ListValueSpecType>;
|
||||
export interface ValueSpecListOf<T extends ListValueSpecType> extends WithStandalone {
|
||||
export interface ValueSpecListOf<T extends ListValueSpecType>
|
||||
extends WithStandalone {
|
||||
type: "list";
|
||||
subtype: T;
|
||||
spec: ListValueSpecOf<T>;
|
||||
@@ -122,7 +123,10 @@ export interface ValueSpecListOf<T extends ListValueSpecType> extends WithStanda
|
||||
}
|
||||
|
||||
// sometimes the type checker needs just a little bit of help
|
||||
export function isValueSpecListOf<S extends ListValueSpecType>(t: ValueSpecList, s: S): t is ValueSpecListOf<S> {
|
||||
export function isValueSpecListOf<S extends ListValueSpecType>(
|
||||
t: ValueSpecList,
|
||||
s: S
|
||||
): t is ValueSpecListOf<S> {
|
||||
return t.subtype === s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user