Naive state management + syntax check works!
This commit is contained in:
parent
bdf12cafdb
commit
d8cc597eba
14 changed files with 501 additions and 60 deletions
|
|
@ -1,9 +1,18 @@
|
|||
// Portions of this file are Copyright 2021 Google LLC, and licensed under GPL2+. See COPYING.
|
||||
|
||||
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
||||
|
||||
import { createContext } from "react"
|
||||
import { Model } from "./model"
|
||||
|
||||
export interface State {
|
||||
source: {
|
||||
content: string
|
||||
params: {
|
||||
source: string,
|
||||
},
|
||||
checkerRun?: {
|
||||
logText: string,
|
||||
markers: monaco.editor.IMarkerData[]
|
||||
}
|
||||
output?: {
|
||||
path: string,
|
||||
timestamp: number,
|
||||
|
|
@ -12,3 +21,12 @@ export interface State {
|
|||
},
|
||||
};
|
||||
|
||||
export const ModelContext = createContext(new Model(
|
||||
{
|
||||
params: {
|
||||
source: ''
|
||||
}
|
||||
},
|
||||
() => { throw new Error('Not implemented'); }
|
||||
));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue