mirror of
https://github.com/JonasunderscoreJones/api-worker.git
synced 2025-10-23 18:39:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
commit
58a42872a0
1745 changed files with 741893 additions and 0 deletions
48
node_modules/get-source/get-source.d.ts
generated
vendored
Normal file
48
node_modules/get-source/get-source.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
|
||||
declare interface Location {
|
||||
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
|
||||
declare interface ResolvedLocation<FileType> extends Location {
|
||||
|
||||
sourceFile: FileType;
|
||||
sourceLine: string;
|
||||
error?: Error;
|
||||
}
|
||||
|
||||
declare interface File {
|
||||
|
||||
path: string;
|
||||
text: string;
|
||||
lines: string[];
|
||||
error?: Error;
|
||||
}
|
||||
|
||||
declare interface FileAsync extends File {
|
||||
resolve (location: Location): Promise<ResolvedLocation<FileAsync>>
|
||||
}
|
||||
|
||||
declare interface FileSync extends File {
|
||||
resolve (location: Location): ResolvedLocation<FileSync>
|
||||
}
|
||||
|
||||
declare interface FileCache<T> {
|
||||
|
||||
resetCache (): void;
|
||||
getCache (): { [key: string]: T };
|
||||
}
|
||||
|
||||
declare interface getSourceAsync extends FileCache<FileAsync> {
|
||||
(path: string): Promise<FileAsync>;
|
||||
}
|
||||
|
||||
declare interface getSourceSync extends FileCache<FileSync> {
|
||||
(path: string): FileSync;
|
||||
async: getSourceAsync;
|
||||
}
|
||||
|
||||
declare const getSource: getSourceSync;
|
||||
|
||||
export = getSource;
|
Loading…
Add table
Add a link
Reference in a new issue