mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-25 06:26:27 +02:00
fix: added incremental typing to piston
This commit is contained in:
parent
593f59a184
commit
2962e0cf99
14 changed files with 1039 additions and 1318 deletions
21
api/src/types.ts
Normal file
21
api/src/types.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
export type File = {
|
||||
content: string;
|
||||
name?: string;
|
||||
encoding?: 'base64' | 'hex' | 'utf8';
|
||||
};
|
||||
export interface Body {
|
||||
language: string;
|
||||
version: string;
|
||||
files: Array<File>;
|
||||
stdin?: string;
|
||||
args?: Array<string>;
|
||||
run_timeout?: number;
|
||||
compile_timeout?: number;
|
||||
compile_memory_limit?: number;
|
||||
run_memory_limit?: number;
|
||||
}
|
||||
|
||||
|
||||
export type ObjectType<TObject extends Record<any, Record<Key, any>>, Key extends string> = {
|
||||
[K in keyof TObject]: TObject[K][Key];
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue