Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Conform to Typescript strict mode #15

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ModuleApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export interface ModuleApi {

/**
* Gets a value verbatim from the config. The returned value will be of the type specified
* by the user - it is not verified against a schema.
* by the user - it is not verified against a schema. If the value does not exist in the
* config then this will return undefined;
*
* The caller should provide a namespace which it owns to retrieve settings from. During
* read, the `key` will be treated as a sub-key of the namespace on the overall configuration
Expand All @@ -115,5 +116,5 @@ export interface ModuleApi {
* @param key The key to look up.
* @returns The config value verbatim.
*/
getConfigValue<T>(namespace: string, key: string): T;
getConfigValue<T>(namespace: string, key: string): T | undefined;
}
2 changes: 1 addition & 1 deletion src/components/DialogContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export abstract class DialogContent<P extends DialogProps = DialogProps, S exten
this.state = {
busy: false,
...state,
};
} as S;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/lifecycles/WidgetLifecycle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("WidgetLifecycle", () => {
beforeAll(() => {
module = new class extends RuntimeModule {
constructor() {
super(undefined);
super(undefined as any);

this.on(WidgetLifecycle.CapabilitiesRequest, this.capabilitiesListener);
this.on(WidgetLifecycle.PreLoadRequest, this.preloadListener);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"esModuleInterop": true,
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"declaration": false,
"noEmit": true,
"jsx": "react"
"jsx": "react",
"strict": true
},
"include": [
"./src/**/*.ts",
Expand Down