a772c26a71
* add tests but not baselines or fixes * Update original change Still probably wrong; probably doesn't even compile beacuse I'm just typing on my laptop. * fix error code ok * notes to self * Error: property is specified more than once via spread * make jsx tests stricter * update semicolon error message * use ?. because it is great * use maybeTypeOfKind in new code * restore jsx error * add tests
14 lines
383 B
TypeScript
14 lines
383 B
TypeScript
// without strict null checks, none of these should be an error
|
|
declare var ab: { a: number, b: number };
|
|
declare var abq: { a: number, b?: number };
|
|
var unused1 = { b: 1, ...ab }
|
|
var unused2 = { ...ab, ...ab }
|
|
var unused3 = { b: 1, ...abq }
|
|
|
|
function g(obj: { x: number | undefined }) {
|
|
return { x: 1, ...obj };
|
|
}
|
|
function h(obj: { x: number }) {
|
|
return { x: 1, ...obj };
|
|
}
|