1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-24 06:03:28 +00:00
CC-Tweaked/src/web/copy-cat.d.ts
Jonathan Coates a4c9e89370
Runnable examples (#576)
Provides a basic interface for running examples on tweaked.cc. This is probably
janky as anything, but it works on my machine.

This is the culmination of 18 months of me building far too much infrastructure
(copy-cat, illuaminate), so that's nice I guess.

I should probably get out more.
2020-11-12 19:01:50 +00:00

22 lines
530 B
TypeScript

import { h, Component, render, ComponentChild } from "preact";
export { h, Component, render };
export type ComputerAccess = unknown;
export type MainProps = {
hdFont?: boolean | string,
persistId?: number,
files?: { [filename: string]: string | ArrayBuffer },
label?: string,
width?: number,
height?: number,
resolve?: (computer: ComputerAccess) => void,
}
declare class Computer extends Component<MainProps, unknown> {
public render(props: MainProps, state: unknown): ComponentChild;
}
export { Computer };