-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Description
Steps to reproduce
function normalise_trace_logs([log]: any[]) {
let normalised = [];
if (typeof log === "string" && log.includes("%c")) {
normalised.push({ log, highlighted: log.includes("foo") });
} else {
normalised.push({ log });
}
return normalised;
}
function equal<T>(_actual: T, _expected: T): void {}
equal(normalise_trace_logs([]), [
{ log: 'effect' },
{ log: '$derived', highlighted: true },
{ log: 'double', highlighted: false },
{ log: 4 },
]);
Behavior with [email protected]
No errors
Behavior with tsgo
src/main.ts:17:24 - error TS2353: Object literal may only specify known properties, and 'highlighted' does not exist in type '{ log: any; }'.
17 { log: '$derived', highlighted: true },
~~~~~~~~~~~
src/main.ts:18:22 - error TS2353: Object literal may only specify known properties, and 'highlighted' does not exist in type '{ log: any; }'.
18 { log: 'double', highlighted: false },
~~~~~~~~~~~
Found 2 errors in the same file, starting at: src/main.ts:17
Context: another error that appeared in the TSGo CI check on the Svelte repo.
Seems to be caused by #1759
Metadata
Metadata
Assignees
Labels
No labels