Skip to content

Commit

Permalink
misc uncertainties
Browse files Browse the repository at this point in the history
  • Loading branch information
vidartf committed Dec 20, 2019
1 parent 56bbec9 commit cf623f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
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
});
});

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

0 comments on commit cf623f1

Please sign in to comment.