frontend/control: Manually assert type
This commit is contained in:
parent
a070ced312
commit
aeceae11d5
2 changed files with 1 additions and 4 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
declare interface Window {
|
|
||||||
readonly pathbuilders: {[name: string]: string}
|
|
||||||
}
|
|
||||||
|
|
@ -11,7 +11,7 @@ const types: Record<string, (element: HTMLElement) => HTMLElement | string> = {
|
||||||
return text[text.length - 1];
|
return text[text.length - 1];
|
||||||
},
|
},
|
||||||
"pathbuilders": () => {
|
"pathbuilders": () => {
|
||||||
const pathbuilders = window.pathbuilders; // read from context!
|
const pathbuilders: {[name: string]: string} = (window as any).pathbuilders; // must be declared globally on page!
|
||||||
const wrapper = document.createElement("span");
|
const wrapper = document.createElement("span");
|
||||||
|
|
||||||
let found_one = false
|
let found_one = false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue