mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +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';
|
type: 'running' | 'paused' | 'error';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type Language = 'javascript' | 'python' | 'java' | 'csharp';
|
||||||
|
|
||||||
export interface SourceProps {
|
export interface SourceProps {
|
||||||
text: string;
|
text: string;
|
||||||
language: string;
|
language: Language;
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
// 1-based
|
// 1-based
|
||||||
highlight?: SourceHighlight[];
|
highlight?: SourceHighlight[];
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import './codeMirrorWrapper.css';
|
import './codeMirrorWrapper.css';
|
||||||
|
import type { Language } from './codeMirrorWrapper';
|
||||||
import { CodeMirrorWrapper } from './codeMirrorWrapper';
|
import { CodeMirrorWrapper } from './codeMirrorWrapper';
|
||||||
|
|
||||||
export type SourceHighlight = {
|
export type SourceHighlight = {
|
||||||
@ -25,7 +26,7 @@ export type SourceHighlight = {
|
|||||||
|
|
||||||
export interface SourceProps {
|
export interface SourceProps {
|
||||||
text: string;
|
text: string;
|
||||||
language: string;
|
language: Language;
|
||||||
// 1-based
|
// 1-based
|
||||||
highlight?: SourceHighlight[];
|
highlight?: SourceHighlight[];
|
||||||
revealLine?: number;
|
revealLine?: number;
|
||||||
|
Loading…
Reference in New Issue
Block a user