Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strict nulls for everything except logconsole #7657

Merged
merged 16 commits into from Dec 23, 2019
2 changes: 1 addition & 1 deletion packages/codemirror-extension/src/index.ts
Expand Up @@ -348,7 +348,7 @@ function activateEditorCommands(
}
modeMenu.addItem({
command: CommandIDs.changeMode,
args: { ...spec }
args: { ...spec } as any // TODO: Casting to `any` until lumino typings are fixed
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xref this comment: jupyterlab/lumino#32 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

});
});

Expand Down
5 changes: 4 additions & 1 deletion packages/completer/src/model.ts
Expand Up @@ -482,7 +482,10 @@ namespace Private {
export function findOrderedTypes(typeMap: Completer.TypeMap): string[] {
const filtered = Object.keys(typeMap)
.map(key => typeMap[key])
.filter(value => value && !(value in KNOWN_MAP))
.filter(
(value: string | null): value is string =>
!!value && !(value in KNOWN_MAP)
)
.sort((a, b) => a.localeCompare(b));

return KNOWN_TYPES.concat(filtered);
Expand Down
4 changes: 2 additions & 2 deletions packages/settingeditor/src/pluginlist.tsx
Expand Up @@ -53,8 +53,8 @@ export class PluginList extends Widget {
/**
* The selection value of the plugin list.
*/
get scrollTop(): number {
return this.node.querySelector('ul').scrollTop;
get scrollTop(): number | undefined {
return this.node.querySelector('ul')?.scrollTop;
}

/**
Expand Down