chore: add type checking (#20280)

This commit is contained in:
wopperer 2023-01-27 23:18:46 +01:00 committed by GitHub
parent 98a0f98577
commit dfb53513ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -27,9 +27,11 @@ export type SourceHighlight = {
type: 'running' | 'paused' | 'error';
};
export type Language = 'javascript' | 'python' | 'java' | 'csharp';
export interface SourceProps {
text: string;
language: string;
language: Language;
readOnly: boolean;
// 1-based
highlight?: SourceHighlight[];

View File

@ -16,6 +16,7 @@
import * as React from 'react';
import './codeMirrorWrapper.css';
import type { Language } from './codeMirrorWrapper';
import { CodeMirrorWrapper } from './codeMirrorWrapper';
export type SourceHighlight = {
@ -25,7 +26,7 @@ export type SourceHighlight = {
export interface SourceProps {
text: string;
language: string;
language: Language;
// 1-based
highlight?: SourceHighlight[];
revealLine?: number;