mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-13 17:14:02 +03:00
chore: add type checking (#20280)
This commit is contained in:
parent
98a0f98577
commit
dfb53513ea
@ -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[];
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user