Closed adaburrows closed 1 year ago
ui/src/components/Profiles.ts
.I don't think we can do much with this now. But it will almost completely disappear with https://github.com/lightningrodlabs/rea-playspace/issues/118#issuecomment-1254753106
deferOnChange<T> (name: string, value: T, onChange: ({}) => void)
slChangeConstructor<T> (name: string, onChange: ({}) => void, setState: ({}) => void, parsers?: {}, validator?: ({}) => boolean)
padBy2 (n: number): string
getDateParts (dt: Date)
DateToInputValueString (dt: Date): string
DateToUiString (dt: Date): string
NumberToString (value: number | string): string
[x] Move to typed-object-tweezers
.
rejectEmptyFields<T>(unfiltered: T): T
— not used?
assignFields<T extends Object, U extends Object>(unfiltered: T, context: U)
— used everywhere, but definitely needs to be a part of Yaati
overwriteFields<T extends Object, U extends Object>(unfiltered: T, context: U)
— not used
toJSON<T extends Object, U extends Object> (context: U): T
— used in all models
fieldsToJSON<T extends Object, U extends Object> (context: U, fields: Array<string>): T
— used in a few models
objectsDiff<T extends Object> (A: T, B: T): boolean
— used in FlowModal
traversePath (tree: {}, path: string, hasObject: (cursor: {}, slug: string) => void, noObject: (cursor: {}, slug: string) => void, skipRoot: boolean = false, checkRoot: boolean = false)
— used in localstore
getPath (tree: {}, startPath: string, skipRoot: boolean = false, checkRoot: boolean = false)
— used in localstore, YatiReactHook, YatiTreeStore
traverseTree(tree: {}, startPath: string, pre: (path: string, obj: {}) => void, post: (path: string, obj: {}) => void, oldPath: string = '')
— used in localstore and YatiTreeStore
Part of Yaati.
Part of Yaati.
The general hooks for data stores.
The wrapper for a Svelte Readable.
Let's keep this where it is for now.
There are several things to focus on in this ticket:
Optionally, make a path generator that uses the TreeDefinition to make the correct template strings for paths.