From c2b3fa4fe28e0a9581bceeac3bf177e96dd3b874 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Tue, 24 Nov 2020 19:32:30 -0800 Subject: [PATCH] Update projects to build with new config --- api-demo/src/advancedDemo.ts | 2 +- api-demo/src/simpleDemo.ts | 2 +- playground/src/CodeEditor.tsx | 4 ++-- playground/src/TabPane.tsx | 2 +- tsdoc-config/src/TSDocConfigFile.ts | 2 +- .../src/__tests__/TSDocConfigFile.test.ts | 21 ++++++++++--------- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/api-demo/src/advancedDemo.ts b/api-demo/src/advancedDemo.ts index c7b5fc0..d07ed6a 100644 --- a/api-demo/src/advancedDemo.ts +++ b/api-demo/src/advancedDemo.ts @@ -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'; diff --git a/api-demo/src/simpleDemo.ts b/api-demo/src/simpleDemo.ts index 282e194..f5e982c 100644 --- a/api-demo/src/simpleDemo.ts +++ b/api-demo/src/simpleDemo.ts @@ -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'; diff --git a/playground/src/CodeEditor.tsx b/playground/src/CodeEditor.tsx index 0969c13..91f0c54 100644 --- a/playground/src/CodeEditor.tsx +++ b/playground/src/CodeEditor.tsx @@ -68,7 +68,7 @@ export class CodeEditor extends React.Component 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 = { diff --git a/playground/src/TabPane.tsx b/playground/src/TabPane.tsx index 534aa46..4576ecf 100644 --- a/playground/src/TabPane.tsx +++ b/playground/src/TabPane.tsx @@ -108,7 +108,7 @@ export class TabPane extends React.Component { ); } - private _onClickTab(tabIndex: number, event: MouseEvent): void { + private _onClickTab(tabIndex: number, event: React.MouseEvent): void { this.setState({ selectedTabIndex: tabIndex }); } diff --git a/tsdoc-config/src/TSDocConfigFile.ts b/tsdoc-config/src/TSDocConfigFile.ts index b65cd25..3af040c 100644 --- a/tsdoc-config/src/TSDocConfigFile.ts +++ b/tsdoc-config/src/TSDocConfigFile.ts @@ -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 }); diff --git a/tsdoc-config/src/__tests__/TSDocConfigFile.test.ts b/tsdoc-config/src/__tests__/TSDocConfigFile.test.ts index 8e0af96..9902c31 100644 --- a/tsdoc-config/src/__tests__/TSDocConfigFile.test.ts +++ b/tsdoc-config/src/__tests__/TSDocConfigFile.test.ts @@ -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 {