#Type System Help: How to transform 1 dictionary's variables into another type of variable??

1 messages · Page 1 of 1 (latest)

lethal totem
#
type Generic<V> = {
    Value: V,
    Changed: Signal<V>,
}

type List = {
    Example1: boolean,
    Example2: number,
    Example3: string,
}

-- how to transform "List" type into:

type TransformedList = {
    Example1: Generic<boolean>,
    Example2: Generic<number>,
    Example3: Generic<string>,
}

-- ???????

-- dont know how ive been thinking about it for days...
-- maybe using new type functions but ive tried and cant figure out how to create the generic type inside of the function

-- thanks for any help
#
type TestList = {
    [keyof<List>]: Generic<index<List, keyof<List>>>
}
#

best i could personally come up with

#

no idea what im doing tho

#

i have made 1 advancement just now

#

theres so much undocumented little gremlins