fix: stream static files from disk (#1734)

This commit is contained in:
Marvin Hagemeister
2023-09-05 12:12:10 +02:00
committed by GitHub
parent 63c90ddc67
commit c767cc5067
4 changed files with 54 additions and 11 deletions
+8 -1
View File
@@ -4,6 +4,7 @@ export {
EsbuildSnapshot,
type JSXConfig,
} from "./esbuild.ts";
export { AotSnapshot } from "./aot_snapshot.ts";
export interface Builder {
build(): Promise<BuildSnapshot>;
}
@@ -14,7 +15,13 @@ export interface BuildSnapshot {
/** For a given file, return it's contents.
* @throws If the file is not contained in this snapshot. */
read(path: string): ReadableStream<Uint8Array> | Uint8Array | null;
read(
path: string,
):
| ReadableStream<Uint8Array>
| Uint8Array
| null
| Promise<ReadableStream<Uint8Array> | Uint8Array | null>;
/** For a given entrypoint, return it's list of dependencies.
*