From: Yadd Date: Sun, 26 Jan 2025 15:18:40 +0000 (+0100) Subject: fix typescript X-Git-Tag: archive/raspbian/7.3.0+dfsg1+_cs24.12.11-1+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=832b9626988789c6c48e75e012e9d91fed15e909;p=node-undici.git fix typescript Forwarded: no Last-Update: 2024-04-05 Gbp-Pq: Name fix-typescript.patch --- diff --git a/llhttp/bin/build_wasm.ts b/llhttp/bin/build_wasm.ts index d6183b5..f8be3d2 100644 --- a/llhttp/bin/build_wasm.ts +++ b/llhttp/bin/build_wasm.ts @@ -40,6 +40,7 @@ if (process.argv[2] === '--docker') { // It will work flawessly if uid === gid === 1000 // there will be some warnings otherwise. if (process.platform === 'linux') { +// @ts-ignore cmd += ` --user ${process.getuid!()}:${process.getegid!()}`; } cmd += ` --mount type=bind,source=${WASM_SRC}/build,target=/home/node/llhttp/build llhttp_wasm_builder npm run wasm`; diff --git a/llparse/src/implementation/c/code/base.ts b/llparse/src/implementation/c/code/base.ts index 888330d..cb8cf24 100644 --- a/llparse/src/implementation/c/code/base.ts +++ b/llparse/src/implementation/c/code/base.ts @@ -3,7 +3,7 @@ import * as frontend from 'llparse-frontend'; import { Compilation } from '../compilation'; export abstract class Code { - protected cachedDecl: string | undefined; + public cachedDecl: string | undefined; constructor(public readonly ref: T) { } diff --git a/llparse/src/implementation/c/node/base.ts b/llparse/src/implementation/c/node/base.ts index 51f90bb..83992e7 100644 --- a/llparse/src/implementation/c/node/base.ts +++ b/llparse/src/implementation/c/node/base.ts @@ -13,8 +13,8 @@ export interface INodeEdge { } export abstract class Node { - protected cachedDecl: string | undefined; - protected privCompilation: Compilation | undefined; + public cachedDecl: string | undefined; + public privCompilation: Compilation | undefined; constructor(public readonly ref: T) { } @@ -39,12 +39,12 @@ export abstract class Node { return res; } - protected get compilation(): Compilation { + public get compilation(): Compilation { assert(this.privCompilation !== undefined); return this.privCompilation!; } - protected prologue(out: string[]): void { + public prologue(out: string[]): void { const ctx = this.compilation; out.push(`if (${ctx.posArg()} == ${ctx.endPosArg()}) {`); @@ -56,11 +56,11 @@ export abstract class Node { out.push('}'); } - protected pause(out: string[]): void { + public pause(out: string[]): void { out.push(`return ${this.cachedDecl};`); } - protected tailTo(out: string[], edge: INodeEdge): void { + public tailTo(out: string[], edge: INodeEdge): void { const ctx = this.compilation; const target = ctx.unwrapNode(edge.node).build(ctx); diff --git a/llparse/src/implementation/c/node/error.ts b/llparse/src/implementation/c/node/error.ts index 29dce63..8055081 100644 --- a/llparse/src/implementation/c/node/error.ts +++ b/llparse/src/implementation/c/node/error.ts @@ -5,7 +5,7 @@ import { STATE_ERROR } from '../constants'; import { Node } from './base'; class ErrorNode extends Node { - protected storeError(out: string[]): void { + public storeError(out: string[]): void { const ctx = this.compilation; let hexCode: string;