11// Parse HTML text into document fragment.
22function parseHTML ( document : Document , html : string ) : DocumentFragment {
33 const template = document . createElement ( 'template' )
4+ // eslint-disable-next-line github/no-inner-html
45 template . innerHTML = html
56 return document . importNode ( template . content , true )
67}
@@ -23,8 +24,8 @@ export class ErrorWithResponse extends Error {
2324 }
2425}
2526
26- function makeDeferred < T > ( ) : [ Promise < T > , ( ) => void , ( ) => void ] {
27- let resolve : ( ) => void
27+ function makeDeferred < T > ( ) : [ Promise < T > , ( x ?: unknown ) => void , ( ) => void ] {
28+ let resolve : ( x ?: unknown ) => void
2829 let reject : ( ) => void
2930 const promise = new Promise ( function ( _resolve , _reject ) {
3031 resolve = _resolve
@@ -218,16 +219,18 @@ async function remoteSubmit(req: SimpleRequest): Promise<SimpleResponse> {
218219 headers : response . headers ,
219220 text : '' ,
220221 get json ( ) {
221- // eslint-disable-next-line no-shadow, @typescript-eslint/no-this-alias
222+ // eslint-disable-next-line @typescript-eslint/ no-shadow, @typescript-eslint/no-this-alias
222223 const response : SimpleResponse = this
223224 const data = JSON . parse ( response . text )
224225 delete response . json
225226 response . json = data
226227 return response . json
227228 } ,
228229 get html ( ) {
229- // eslint-disable-next-line no-shadow, @typescript-eslint/no-this-alias
230+ // eslint-disable-next-line @typescript-eslint/ no-shadow, @typescript-eslint/no-this-alias
230231 const response : SimpleResponse = this
232+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
233+ // @ts -ignore
231234 delete response . html
232235
233236 response . html = parseHTML ( document , response . text )
0 commit comments