`@sapui5/ts-types-esm` - compile errors with typescript `strict` flag
See original GitHub issuetsc
output
node_modules/@sapui5/ts-types-esm/types/sap.ui.comp.d.ts:3412:5 - error TS2416: Property 'getVisibleInFilterBar' in type 'FilterGroupItem' is not assignable to the same property in base type 'FilterItem'.
Type 'undefined' is not assignable to type '() => boolean'.
3412 getVisibleInFilterBar: undefined;
~~~~~~~~~~~~~~~~~~~~~
node_modules/@sapui5/ts-types-esm/types/sap.ui.comp.d.ts:15766:5 - error TS2416: Property 'search' in type 'SmartFilterBar' is not assignable to the same property in base type 'FilterBar'.
Type '(bSync?: boolean | undefined) => boolean | undefined' is not assignable to type '() => boolean'.
Type 'boolean | undefined' is not assignable to type 'boolean'.
Type 'undefined' is not assignable to type 'boolean'.
15766 search(
~~~~~~
node_modules/@sapui5/ts-types-esm/types/sap.ui.core.d.ts:33177:5 - error TS2416: Property 'getId' in type 'UIArea' is not assignable to the same property in base type 'ManagedObject'.
Type '() => string | null' is not assignable to type '() => string'.
Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
33177 getId(): string | null;
~~~~~
node_modules/@sapui5/ts-types-esm/types/sap.ui.vtm.d.ts:665:5 - error TS2416: Property 'setTooltip' in type 'Column' is not assignable to the same property in base type 'UI5Element'.
Type '(sTooltip?: string | undefined) => this' is not assignable to type '(vTooltip: string | TooltipBase) => this'.
Types of parameters 'sTooltip' and 'vTooltip' are incompatible.
Type 'string | TooltipBase' is not assignable to type 'string | undefined'.
Type 'TooltipBase' is not assignable to type 'string'.
665 setTooltip(
~~~~~~~~~~
tsconfig
{
"compilerOptions": {
"target": "es2018",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"declarationMap": false,
"skipLibCheck": false,
"preserveConstEnums": true,
"sourceMap": false,
"allowJs": false,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noImplicitAny": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"forceConsistentCasingInFileNames": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitOverride": true,
"exactOptionalPropertyTypes": false,
"allowUnreachableCode": false,
"stripInternal": false,
"esModuleInterop": true,
"rootDir": "./src",
"outDir": "./dist",
"noEmit": true,
"baseUrl": "./",
"isolatedModules": true,
"resolveJsonModule": true,
"typeRoots": ["./node_modules/@types", "./node_modules/@sapui5/ts-types-esm"],
"paths": {
"thirdparty/*": ["./node_modules/*"]
}
},
"include": ["./src/**/*", "./types/**/*"]
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Consider using Typescript strict flag · Issue #6769 - GitHub
Great job on the Typescript Migration! strict is one of the most useful Typescript flags to catch cannot access key of undefined errors...
Read more >The --strict Compiler Option in TypeScript - Marius Schulz
TypeScript 2.3 introduced a new --strict compiler option that enables a number of other compiler options related to stricter type checking.
Read more >TypeScript "Strict" Flag Walkthrough - Miquido Blog
Learn more about how some of Typescript flags affect error catching at compilation time with our walkthrough. Visit our blog!
Read more >How to Actually Improve Type Safety with the TypeScript Strict ...
The hard way. Another way to enable a strict compiler flag is to go through each error message from the compiler, one at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
all good, i know you guys close issues as soon as they are fixed rather than when the fix is released. as long as it’s been fixed that’s fine with me 😃
@akudev one of the errors is still there in 1.98.0:
can this issue be re-opened or should i raise a new one?