Update projects to build with new config

This commit is contained in:
Pete Gonzalez 2020-11-24 19:32:30 -08:00
Родитель fc5af8ac91
Коммит c2b3fa4fe2
6 изменённых файлов: 17 добавлений и 16 удалений

Просмотреть файл

@ -1,4 +1,4 @@
import * as colors from 'colors';
import colors from 'colors';
import * as os from 'os';
import * as path from 'path';
import * as ts from 'typescript';

Просмотреть файл

@ -1,4 +1,4 @@
import * as colors from 'colors';
import colors from 'colors';
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';

Просмотреть файл

@ -68,7 +68,7 @@ export class CodeEditor extends React.Component<ICodeEditorProps, ICodeEditorSta
private _existingSyntaxStyles: { [hash: string]: string } = {};
private _editorId: string;
private _isMounted: boolean;
private _isMounted: boolean=false;
private _editor: monacoEditor.editor.IStandaloneCodeEditor | undefined;
private _placeholderDivRef: HTMLDivElement | undefined;
@ -106,7 +106,7 @@ export class CodeEditor extends React.Component<ICodeEditorProps, ICodeEditorSta
if (!CodeEditor._initializePromise) {
CodeEditor._initializePromise = new Promise(
(resolve: (monaco: typeof monacoEditor) => void, reject: (error: Error) => void ) => {
const monacoWindow: IMonacoWindow = window as IMonacoWindow;
const monacoWindow: IMonacoWindow = window as unknown as IMonacoWindow;
monacoWindow.require.config({ paths: { 'vs': `${MONACO_BASE_URL}vs/` }});
monacoWindow.MonacoEnvironment = {

Просмотреть файл

@ -108,7 +108,7 @@ export class TabPane extends React.Component<ITabPaneProps, ITabPaneState> {
);
}
private _onClickTab(tabIndex: number, event: MouseEvent): void {
private _onClickTab(tabIndex: number, event: React.MouseEvent<HTMLAnchorElement>): void {
this.setState({ selectedTabIndex: tabIndex });
}

Просмотреть файл

@ -11,7 +11,7 @@ import {
import * as fs from 'fs';
import * as resolve from 'resolve';
import * as path from 'path';
import * as Ajv from 'ajv';
import Ajv from 'ajv';
import * as jju from 'jju';
const ajv: Ajv.Ajv = new Ajv({ verbose: true });

Просмотреть файл

@ -15,17 +15,18 @@ expect.addSnapshotSerializer({
return value instanceof TSDocConfigFile;
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
print(value: TSDocConfigFile, serialize: (value: any) => string, indent: (str: string) => string): any {
return serialize({
tsdocSchema: value.tsdocSchema,
filePath: getRelativePath(value.filePath),
fileNotFound: value.fileNotFound,
extendsPaths: value.extendsPaths,
extendsFiles: value.extendsFiles,
tagDefinitions: value.tagDefinitions,
messages: value.log.messages
print(value: unknown, print: (value: any) => string, indent: any, options: any, colors: any): any {
const configFile: TSDocConfigFile = value as TSDocConfigFile;
return print({
tsdocSchema: configFile.tsdocSchema,
filePath: getRelativePath(configFile.filePath),
fileNotFound: configFile.fileNotFound,
extendsPaths: configFile.extendsPaths,
extendsFiles: configFile.extendsFiles,
tagDefinitions: configFile.tagDefinitions,
messages: configFile.log.messages,
});
}
},
});
function testLoadingFolder(assetPath: string): TSDocConfigFile {