c:\project\node_modules\@smui\common\src\internal\useActions.ts:42:11
Error: Cannot invoke an object which is possibly 'undefined'.
actionReturns.push(
action(node as HTMLElement & SVGElement, actionEntry[1])
);
c:\project\node_modules\@smui\common\src\internal\useActions.ts:45:28
Error: Cannot invoke an object which is possibly 'undefined'.
} else {
actionReturns.push(action(node as HTMLElement & SVGElement));
}
c:\project\node_modules\@smui\common\src\internal\exclude.ts:10:23
Error: Object is possibly 'undefined'.
const name = names[i];
const cashIndex = name.indexOf('$');
if (
c:\project\node_modules\@smui\common\src\internal\exclude.ts:13:20
Error: Object is possibly 'undefined'.
cashIndex !== -1 &&
keys.indexOf(name.substring(0, cashIndex + 1)) !== -1
) {
c:\project\node_modules\@smui\common\src\internal\exclude.ts:17:22
Error: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
}
if (keys.indexOf(name) !== -1) {
continue;
c:\project\node_modules\@smui\common\src\internal\exclude.ts:20:44
Error: Type 'undefined' cannot be used as an index type.
}
newObj[name as keyof Partial<T>] = obj[name];
}
c:\project\node_modules\@smui\common\src\internal\forwardEventsBuilder.ts:75:17
Error: Object is possibly 'undefined'.
? ':' + newEventTypeParts[i]
: newEventTypeParts[i]
.split('-')
c:\project\node_modules\@smui\common\src\internal\forwardEventsBuilder.ts:99:9
Error: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
const parts = eventType.split(oldModifierMatch ? ':' : '$');
eventType = parts[0];
const eventOptions: {
c:\project\node_modules\@smui\common\src\internal\forwardEventsBuilder.ts:157:11
Error: Object is possibly 'undefined'.
// Listen to all the events added before mount.
$on(events[i][0], events[i][1]);
}
c:\project\node_modules\@smui\common\src\internal\forwardEventsBuilder.ts:157:25
Error: Object is possibly 'undefined'.
// Listen to all the events added before mount.
$on(events[i][0], events[i][1]);
}
c:\project\node_modules\@smui\common\src\internal\forwardEventsBuilder.ts:164:11
Error: Cannot invoke an object which is possibly 'undefined'.
for (let i = 0; i < destructors.length; i++) {
destructors[i]();
}
c:\project\node_modules\@smui\common\src\internal\prefixFilter.ts:10:9
Error: Object is possibly 'undefined'.
const name = names[i];
if (name.substring(0, prefix.length) === prefix) {
newObj[name.substring(prefix.length)] = obj[name];
c:\project\node_modules\@smui\common\src\internal\prefixFilter.ts:11:14
Error: Object is possibly 'undefined'.
if (name.substring(0, prefix.length) === prefix) {
newObj[name.substring(prefix.length)] = obj[name];
}
c:\project\node_modules\@smui\common\src\internal\prefixFilter.ts:11:51
Error: Type 'undefined' cannot be used as an index type.
if (name.substring(0, prefix.length) === prefix) {
newObj[name.substring(prefix.length)] = obj[name];
}
Describe the bug
To Reproduce
noUncheckedIndexedAccess
intsconfig.json
:svelte-check
Expected behavior no errors