Skip to content
Myr

test(ts): nested objects & interfaces

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by aleclarson · committed by aleclarson · parent 691e73b · Browse files · 1 file+37 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+37 added−0 removed

  • tests:+37 added−0 removed

1 file+37 added−0 removed

modified:__tests__/types.ts+37 added
138 unmodified lines
139 val = fromDraft(toDraft(val))140 let draft: typeof val = toDraft(val)141}142143// Mutable array (nested in tuple)144{145 let val: [string[]]146 val = fromDraft(toDraft(val))147 let draft: typeof val = toDraft(val)148}149150// Readonly array151{152 let val: ReadonlyArray<string>153 val = fromDraft(toDraft(val))
13 unmodified lines
167 val = fromDraft(toDraft(val))168 let draft: typeof val = toDraft(val)169}170171// Mutable object (nested in mutable object)172{173 let val: {a: {b: 1}}174 val = fromDraft(toDraft(val))175 let draft: typeof val = toDraft(val)176}177178// Interface179{180 interface Foo {181 a: {b: number}182 }183 let val: Foo184 val = fromDraft(toDraft(val))185 let draft: typeof val = toDraft(val)186}187188// Interface (nested in interface)189{190 interface Foo {191 a: {b: number}192 }193 interface Bar {194 foo: Foo195 }196 let val: Bar197 val = fromDraft(toDraft(val))198 let draft: typeof val = toDraft(val)199}200201// Readonly object202{203 let val: Readonly<{a: 1}>204 val = fromDraft(toDraft(val))
115 unmodified lines