Skip to content

Commit 8b3ab07

Browse files
armantaherianjesserockz
authored andcommitted
Fix TypeScript errors
1 parent 4dc1fd9 commit 8b3ab07

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/api/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const fetchApiBase = async (
2323
if (!options.headers) {
2424
options.headers = {};
2525
}
26+
// @ts-ignore
2627
options.headers["X-CSRFToken"] = csrfCookie;
2728
}
2829
const resp = await fetch(path, options);

src/util/console-color.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class ColoredConsole {
2828
}
2929

3030
addLine(line: string) {
31-
const re = /(?:\033|\\033)(?:\[(.*?)[@-~]|\].*?(?:\007|\033\\))/g;
31+
const re = /(?:\x1b|\\033)(?:\[(.*?)[@-~]|\].*?(?:\x07|\x07\\))/g;
3232
let i = 0;
3333

3434
if (this.state.carriageReturn) {

src/wizard/wizard-dialog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,14 +326,14 @@ export class ESPHomeWizardDialog extends LitElement {
326326
327327
<mwc-list class="platforms">
328328
${Object.keys(supportedPlatforms).map((key) =>
329-
supportedPlatforms[key].showInDeviceTypePicker
329+
supportedPlatforms[key as SupportedPlatforms].showInDeviceTypePicker
330330
? html`
331331
<mwc-list-item
332332
hasMeta
333333
.platform=${key}
334334
@click=${this._handlePickPlatformClick}
335335
>
336-
<span>${supportedPlatforms[key].label}</span>
336+
<span>${supportedPlatforms[key as SupportedPlatforms].label}</span>
337337
${metaChevronRight}
338338
</mwc-list-item>
339339
`

0 commit comments

Comments
 (0)