-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(compiler): transform module aliases in emitted js, typedefs #4042
Conversation
|
Path | Location | Error | Message |
---|---|---|---|
src/cli/run.ts | (148, 63) | TS2345 | Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. |
src/cli/run.ts | (160, 47) | TS2345 | Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. |
src/cli/run.ts | (175, 63) | TS2345 | Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. |
src/cli/run.ts | (176, 14) | TS18048 | 'config.sys' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (371, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (373, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (374, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (376, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (377, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (379, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (380, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (381, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/test/validate-config.spec.ts | (382, 12) | TS18048 | 'config.extras' is possibly 'undefined'. |
src/compiler/config/transpile-options.ts | (72, 71) | TS2345 | Argument of type 'Set<string | null>' is not assignable to parameter of type 'Set'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. |
src/compiler/config/transpile-options.ts | (78, 47) | TS2345 | Argument of type 'Set<string | null>' is not assignable to parameter of type 'Set'. |
src/compiler/config/transpile-options.ts | (126, 5) | TS2322 | Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/config/transpile-options.ts | (129, 5) | TS2322 | Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (31, 35) | TS2454 | Variable 'compilerExe' is used before being assigned. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (53, 75) | TS2345 | Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (81, 24) | TS18048 | 'config.sys' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (88, 5) | TS18048 | 'config.logger' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (121, 50) | TS18048 | 'config.sys' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (123, 7) | TS2322 | Type 'null' is not assignable to type 'ResolvedModuleWithFailedLookupLocations'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (161, 11) | TS18048 | 'config.sys' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (162, 13) | TS2322 | Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (190, 11) | TS2322 | Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/sys/typescript/typescript-resolve-module.ts | (198, 3) | TS2322 | Type 'null' is not assignable to type 'ResolvedModuleWithFailedLookupLocations'. |
src/compiler/sys/typescript/typescript-sys.ts | (115, 9) | TS2322 | Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/sys/typescript/typescript-sys.ts | (120, 9) | TS18048 | 'config.logger' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-sys.ts | (134, 21) | TS2722 | Cannot invoke an object which is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-sys.ts | (134, 21) | TS18048 | 'compilerSystem.watchDirectory' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-sys.ts | (149, 21) | TS2722 | Cannot invoke an object which is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-sys.ts | (149, 21) | TS18048 | 'compilerSystem.watchFile' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-sys.ts | (210, 24) | TS18048 | 'config.sys' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-sys.ts | (211, 7) | TS2322 | Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/sys/typescript/typescript-sys.ts | (227, 5) | TS18048 | 'results' is possibly 'undefined'. |
src/compiler/sys/typescript/typescript-sys.ts | (227, 25) | TS18048 | 'results' is possibly 'undefined'. |
src/compiler/transformers/test/transpile.ts | (67, 64) | TS2345 | Argument of type 'ScriptTarget | undefined' is not assignable to parameter of type 'ScriptTarget | CreateSourceFileOptions'. |
src/compiler/transformers/test/transpile.ts | (75, 20) | TS2345 | Argument of type 'Config | null | undefined' is not assignable to parameter of type 'Config'. Type 'undefined' is not assignable to type 'Config'. |
src/compiler/transformers/test/transpile.ts | (75, 51) | TS18048 | 'tsSourceFiles' is possibly 'undefined'. |
src/compiler/transformers/test/transpile.ts | (114, 73) | TS2345 | Argument of type 'null' is not assignable to parameter of type 'CollectionCompilerMeta'. |
src/compiler/transformers/test/transpile.ts | (146, 5) | TS2454 | Variable 'declarationOutputText' is used before being assigned. |
src/compiler/transformers/test/transpile.ts | (158, 5) | TS2454 | Variable 'outputText' is used before being assigned. |
src/compiler/transpile/run-program.ts | (43, 51) | TS18048 | 'tsSourceFiles' is possibly 'undefined'. |
src/compiler/transpile/run-program.ts | (43, 104) | TS2345 | Argument of type 'null' is not assignable to parameter of type 'CollectionCompilerMeta'. |
src/compiler/transpile/run-program.ts | (45, 40) | TS18048 | 'tsSourceFiles' is possibly 'undefined'. |
src/compiler/transpile/run-program.ts | (63, 5) | TS18048 | 'transformers.before' is possibly 'undefined'. |
src/compiler/transpile/run-program.ts | (76, 5) | TS18048 | 'transformers.afterDeclarations' is possibly 'undefined'. |
src/compiler/transpile/run-program.ts | (113, 47) | TS2345 | Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/transpile/transpile-module.ts | (52, 5) | TS2322 | Type 'null' is not assignable to type 'string'. |
src/compiler/transpile/transpile-module.ts | (55, 5) | TS2322 | Type 'null' is not assignable to type 'Module'. |
src/compiler/transpile/transpile-module.ts | (83, 65) | TS2345 | Argument of type 'ScriptTarget | undefined' is not assignable to parameter of type 'ScriptTarget | CreateSourceFileOptions'. Type 'undefined' is not assignable to type 'ScriptTarget | CreateSourceFileOptions'. |
src/compiler/transpile/transpile-module.ts | (88, 56) | TS2345 | Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/transpile/transpile-module.ts | (102, 73) | TS2345 | Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. |
src/compiler/transpile/transpile-module.ts | (116, 77) | TS2345 | Argument of type 'null' is not assignable to parameter of type 'CollectionCompilerMeta'. |
src/compiler/transpile/transpile-module.ts | (121, 5) | TS18048 | 'transformers.before' is possibly 'undefined'. |
src/compiler/transpile/transpile-module.ts | (134, 5) | TS18048 | 'transformers.afterDeclarations' is possibly 'undefined'. |
src/compiler/transpile/transpile-module.ts | (138, 5) | TS18048 | 'transformers.after' is possibly 'undefined'. |
src/compiler/transpile/transpile-module.ts | (140, 5) | TS18048 | 'transformers.after' is possibly 'undefined'. |
src/compiler/transpile/transpile-module.ts | (148, 24) | TS2345 | Argument of type 'Diagnostic' is not assignable to parameter of type 'DiagnosticWithLocation'. Types of property 'file' are incompatible. Type 'SourceFile | undefined' is not assignable to type 'SourceFile'. Type 'undefined' is not assignable to type 'SourceFile'. |
src/compiler/transpile/transpile-module.ts | (155, 3) | TS2322 | Type 'Module | undefined' is not assignable to type 'Module'. Type 'undefined' is not assignable to type 'Module'. |
src/compiler/transpile/transpile-module.ts | (162, 41) | TS2538 | Type 'undefined' cannot be used as an index type. |
src/compiler/transpile/transpile-module.ts | (163, 37) | TS2538 | Type 'undefined' cannot be used as an index type. |
src/testing/mocks.ts | (71, 5) | TS2322 | Type 'null' is not assignable to type 'ConfigBundle[] | undefined'. |
src/testing/mocks.ts | (76, 5) | TS2322 | Type 'null' is not assignable to type 'string | undefined'. |
src/testing/mocks.ts | (86, 5) | TS2322 | Type 'null' is not assignable to type 'OutputTarget[] | undefined'. |
src/testing/mocks.ts | (94, 5) | TS2322 | Type 'null' is not assignable to type 'TestingConfig | undefined'. |
src/testing/mocks.ts | (136, 5) | TS2322 | Type 'null' is not assignable to type 'string'. |
src/testing/mocks.ts | (141, 5) | TS2322 | Type 'null' is not assignable to type 'Cache'. |
src/testing/mocks.ts | (144, 5) | TS2322 | Type 'null' is not assignable to type '{ access: (filePath: string) => Promise; accessSync: (filePath: string) => boolean; cancelDeleteDirectoriesFromDisk: (dirPaths: string[]) => void; cancelDeleteFilesFromDisk: (filePaths: string[]) => void; ... 17 more ...; writeFiles: (files: { ...; } | Map<...>, opts?: FsWriteOptions | undefined) => Promise...'. |
src/testing/mocks.ts | (147, 5) | TS2322 | Type 'null' is not assignable to type 'CompilerBuildResults'. |
src/testing/mocks.ts | (157, 33) | TS2345 | Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. |
src/testing/mocks.ts | (163, 37) | TS18048 | 'config' is possibly 'undefined'. |
src/testing/mocks.ts | (163, 37) | TS2345 | Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. |
src/testing/mocks.ts | (224, 30) | TS2322 | Type 'null' is not assignable to type 'string'. |
src/testing/mocks.ts | (229, 28) | TS2322 | Type 'null' is not assignable to type 'string'. |
reports and statistics
Our most error-prone files
Path | Error Count |
---|---|
src/compiler/config/test/validate-dev-server.spec.ts | 49 |
src/compiler/config/test/validate-output-www.spec.ts | 40 |
src/screenshot/connector-base.ts | 40 |
src/dev-server/index.ts | 38 |
src/mock-doc/serialize-node.ts | 36 |
src/compiler/sys/tests/in-memory-fs.spec.ts | 34 |
src/screenshot/screenshot-compare.ts | 33 |
src/compiler/transformers/test/parse-props.spec.ts | 32 |
src/dev-server/server-process.ts | 32 |
src/runtime/vdom/vdom-render.ts | 31 |
src/compiler/sys/typescript/typescript-config.ts | 28 |
src/compiler/build/build-stats.ts | 27 |
src/compiler/output-targets/dist-lazy/generate-lazy-module.ts | 26 |
src/compiler/prerender/prerender-main.ts | 25 |
src/sys/node/test/worker-manager.spec.ts | 24 |
src/compiler/style/test/optimize-css.spec.ts | 23 |
src/runtime/update-component.ts | 23 |
src/testing/puppeteer/puppeteer-element.ts | 23 |
src/compiler/config/test/validate-paths.spec.ts | 22 |
src/utils/test/message-utils.spec.ts | 21 |
Our most common errors
Typescript Error Code | Count | Error messages |
---|---|---|
TS2345 | 595 | Error messagesArgument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'.Type 'undefined' is not assignable to type 'CompilerSystem'. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'Promise<(() => void) | null>' is not assignable to parameter of type 'Promise<() => void>'. Argument of type 'null' is not assignable to parameter of type 'BuildResultsComponentGraph'. Argument of type 'DevServerConfig | undefined' is not assignable to parameter of type 'StencilDevServerConfig'. Type 'undefined' is not assignable to type 'StencilDevServerConfig'. Argument of type 'Promise<(() => void) | null>' is not assignable to parameter of type 'Promise<() => void>'. Type '(() => void) | null' is not assignable to type '() => void'. Type 'null' is not assignable to type '() => void'. Argument of type 'ComponentRuntimeHostListener[] | undefined' is not assignable to parameter of type 'ComponentRuntimeHostListener[]'. Type 'undefined' is not assignable to type 'ComponentRuntimeHostListener[]'. Argument of type 'HTMLScriptElement | null | undefined' is not assignable to parameter of type 'HTMLScriptElement'. Type 'undefined' is not assignable to type 'HTMLScriptElement'. Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'. Argument of type 'Logger | undefined' is not assignable to parameter of type 'Logger'. Type 'undefined' is not assignable to type 'Logger'. Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. Argument of type 'string' is not assignable to parameter of type 'never'. Argument of type 'Diagnostic[] | undefined' is not assignable to parameter of type 'readonly Diagnostic[]'. Type 'undefined' is not assignable to type 'readonly Diagnostic[]'. Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. Argument of type 'BuildConditionals | undefined' is not assignable to parameter of type 'BuildConditionals'. Type 'undefined' is not assignable to type 'BuildConditionals'. Argument of type 'Diagnostic[] | undefined' is not assignable to parameter of type 'Diagnostic[]'. Type 'undefined' is not assignable to type 'Diagnostic[]'. Argument of type '{ styleText: string; output: string; map: null; diagnostics: never[]; imports: never[]; defaultVarName: string; styleDocs: never[]; }' is not assignable to parameter of type 'never'. Argument of type 'WorkerMeta | undefined' is not assignable to parameter of type 'WorkerMeta'. Type 'undefined' is not assignable to type 'WorkerMeta'. Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'Set<string | null>' is not assignable to parameter of type 'Set'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Argument of type 'Set<string | null>' is not assignable to parameter of type 'Set'. Argument of type 'RollupConfig | undefined' is not assignable to parameter of type 'RollupConfig'. Type 'undefined' is not assignable to type 'RollupConfig'. Argument of type '(string[] | undefined)[]' is not assignable to parameter of type 'string[][]'. Type 'string[] | undefined' is not assignable to type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. Argument of type 'ComponentCompilerMeta | undefined' is not assignable to parameter of type 'ComponentCompilerMeta'. Type 'undefined' is not assignable to type 'ComponentCompilerMeta'. Argument of type 'true | Object | undefined' is not assignable to parameter of type 'boolean | Object | null'. Type 'undefined' is not assignable to type 'boolean | Object | null'. Argument of type 'SourceTarget | undefined' is not assignable to parameter of type 'SourceTarget'. Type 'undefined' is not assignable to type 'SourceTarget'. Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. Type 'undefined' is not assignable to type 'boolean'. Argument of type '(string | undefined)[]' is not assignable to parameter of type 'string[]'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type '(string | undefined)[]' is not assignable to parameter of type 'string[]'. Argument of type 'RollupSourceMap | undefined' is not assignable to parameter of type 'SourceMap'. Type 'undefined' is not assignable to type 'SourceMap'. Argument of type 'EntryModule | undefined' is not assignable to parameter of type 'EntryModule'. Type 'undefined' is not assignable to type 'EntryModule'. Argument of type '(Module | undefined)[]' is not assignable to parameter of type 'Module[]'. Type 'Module | undefined' is not assignable to type 'Module'. Type 'undefined' is not assignable to type 'Module'. Argument of type 'Document | null' is not assignable to parameter of type 'Document'. Type 'null' is not assignable to type 'Document'. Argument of type 'Document | null' is not assignable to parameter of type 'Node | MockNode'. Type 'null' is not assignable to type 'Node | MockNode'. Argument of type 'HydrateAnchorElement' is not assignable to parameter of type '{ [attrName: string]: string; }'. 'string' index signatures are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'URL | null' is not assignable to parameter of type 'URL'. Type 'null' is not assignable to type 'URL'. Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'. Argument of type 'SitemapXmpResults | null' is not assignable to parameter of type 'SitemapXmpResults'. Type 'null' is not assignable to type 'SitemapXmpResults'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | URL'. Argument of type 'Map<string, string[]> | undefined' is not assignable to parameter of type 'Map<string, string[]>'. Type 'undefined' is not assignable to type 'Map<string, string[]>'. Argument of type 'undefined' is not assignable to parameter of type 'string'. Argument of type 'ServiceWorkerConfig | undefined' is not assignable to parameter of type 'ServiceWorkerConfig'. Type 'undefined' is not assignable to type 'ServiceWorkerConfig'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | URL'. Type 'undefined' is not assignable to type 'string | URL'. Argument of type 'CssNode[] | null | undefined' is not assignable to parameter of type 'void | CssNode[]'. Argument of type 'CssNode[] | null | undefined' is not assignable to parameter of type 'void | CssNode[]'. Type 'null' is not assignable to type 'void | CssNode[]'. Argument of type 'null' is not assignable to parameter of type 'string'. Argument of type 'CompilerSystemCreateDirectoryOptions | undefined' is not assignable to parameter of type 'CompilerSystemCreateDirectoryOptions'. Type 'undefined' is not assignable to type 'CompilerSystemCreateDirectoryOptions'. Argument of type 'null' is not assignable to parameter of type 'CompilerFileWatcherEvent'. Argument of type 'null' is not assignable to parameter of type '{ access: (filePath: string) => Promise; accessSync: (filePath: string) => boolean; cancelDeleteDirectoriesFromDisk: (dirPaths: string[]) => void; cancelDeleteFilesFromDisk: (filePaths: string[]) => void; ... 17 more ...; writeFiles: (files: { ...; } | Map<...>, opts?: FsWriteOptions | undefined) => Promise...'. Argument of type 'undefined' is not assignable to parameter of type 'TypeChecker'. Argument of type 'CollectionBundleManifest[] | undefined' is not assignable to parameter of type 'any[]'. Type 'undefined' is not assignable to type 'any[]'. Argument of type 'Module | undefined' is not assignable to parameter of type 'Module'. Type 'undefined' is not assignable to type 'Module'. Argument of type 'NodeArray | undefined' is not assignable to parameter of type 'NodeArray | HeritageClause[]'. Type 'undefined' is not assignable to type 'NodeArray | HeritageClause[]'. Argument of type 'Block | undefined' is not assignable to parameter of type 'Block'. Type 'undefined' is not assignable to type 'Block'. Argument of type 'Expression | undefined' is not assignable to parameter of type 'Expression'. Type 'undefined' is not assignable to type 'Expression'. Argument of type 'Symbol | undefined' is not assignable to parameter of type 'Symbol'. Type 'undefined' is not assignable to type 'Symbol'. Argument of type 'TypeNode | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type '(PropertyAssignment | null)[]' is not assignable to parameter of type 'readonly ObjectLiteralElementLike[]'. Type 'PropertyAssignment | null' is not assignable to type 'ObjectLiteralElementLike'. Type 'null' is not assignable to type 'ObjectLiteralElementLike'. Argument of type 'Signature | undefined' is not assignable to parameter of type 'Signature'. Type 'undefined' is not assignable to type 'Signature'. Argument of type 'Identifier | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'ScriptTarget | undefined' is not assignable to parameter of type 'ScriptTarget | CreateSourceFileOptions'. Argument of type 'Config | null | undefined' is not assignable to parameter of type 'Config'. Type 'undefined' is not assignable to type 'Config'. Argument of type 'null' is not assignable to parameter of type 'CollectionCompilerMeta'. Argument of type 'PropertyName | undefined' is not assignable to parameter of type 'PropertyName'. Type 'undefined' is not assignable to type 'PropertyName'. Argument of type 'NamedExportBindings | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'Declaration | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'Identifier | undefined' is not assignable to parameter of type 'string | BindingName'. Type 'undefined' is not assignable to type 'string | BindingName'. Argument of type 'ScriptTarget | undefined' is not assignable to parameter of type 'ScriptTarget | CreateSourceFileOptions'. Type 'undefined' is not assignable to type 'ScriptTarget | CreateSourceFileOptions'. Argument of type 'Diagnostic' is not assignable to parameter of type 'DiagnosticWithLocation'. Types of property 'file' are incompatible. Type 'SourceFile | undefined' is not assignable to type 'SourceFile'. Type 'undefined' is not assignable to type 'SourceFile'. Argument of type '(...pathSegments: string[]) => string | undefined' is not assignable to parameter of type '(...args: string[]) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'OpenInEditorCallback | undefined' is not assignable to parameter of type 'OpenInEditorCallback'. Type 'undefined' is not assignable to type 'OpenInEditorCallback'. Argument of type 'CompilerWatcher | undefined' is not assignable to parameter of type 'CompilerWatcher'. Type 'undefined' is not assignable to type 'CompilerWatcher'. Argument of type '{ editor: string | undefined; }' is not assignable to parameter of type 'OpenInEditorOptions'. Types of property 'editor' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'string | undefined' is not assignable to parameter of type 'PathLike'. Argument of type 'DevServerConfig | undefined' is not assignable to parameter of type 'DevServerConfig'. Type 'undefined' is not assignable to type 'DevServerConfig'. Argument of type 'CompilerBuildResults | undefined' is not assignable to parameter of type 'CompilerBuildResults'. Type 'undefined' is not assignable to type 'CompilerBuildResults'. Argument of type 'Window | undefined' is not assignable to parameter of type 'Window'. Type 'undefined' is not assignable to type 'Window'. Argument of type 'SerializeDocumentOptions | undefined' is not assignable to parameter of type 'HydrateDocumentOptions'. Type 'undefined' is not assignable to type 'HydrateDocumentOptions'. Argument of type 'HydrateDocumentOptions | undefined' is not assignable to parameter of type 'HydrateDocumentOptions'. Type 'undefined' is not assignable to type 'HydrateDocumentOptions'. Argument of type 'MockNode | null' is not assignable to parameter of type 'MockNode'. Type 'null' is not assignable to type 'MockNode'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | null'. Type 'undefined' is not assignable to type 'string | null'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | null'. Argument of type 'ShadowRoot | null' is not assignable to parameter of type 'Node'. Type 'null' is not assignable to type 'Node'. Argument of type 'MockElement' is not assignable to parameter of type 'MockHTMLElement'. Types of property 'namespaceURI' are incompatible. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Argument of type 'null' is not assignable to parameter of type 'string | Node'. Argument of type 'null' is not assignable to parameter of type 'string | boolean | undefined'. Argument of type '(Window & typeof globalThis) | null' is not assignable to parameter of type 'Window'. Type 'null' is not assignable to type 'Window'. Argument of type 'string | null | undefined' is not assignable to parameter of type 'string | undefined'. Argument of type 'HostRef | undefined' is not assignable to parameter of type 'HostRef'. Type 'undefined' is not assignable to type 'HostRef'. Argument of type 'this' is not assignable to parameter of type 'HostElement'. Type 'HostElement' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/declarations/stencil-private").HostElement'. The types returned by 'componentOnReady()' are incompatible between these types. Type 'Promise | undefined' is not assignable to type 'Promise'. Type 'undefined' is not assignable to type 'Promise'. Argument of type 'this' is not assignable to parameter of type 'HostElement'. Argument of type 'string | null' is not assignable to parameter of type 'string | undefined'. Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor'. Argument of type 'HTMLElement | undefined' is not assignable to parameter of type 'HTMLElement'. Type 'undefined' is not assignable to type 'HTMLElement'. Argument of type 'HostElement | undefined' is not assignable to parameter of type 'HostElement'. Type 'undefined' is not assignable to type 'HostElement'. Argument of type 'HostElement | undefined' is not assignable to parameter of type 'EventTarget'. Type 'undefined' is not assignable to type 'EventTarget'. Argument of type 'HostElement | undefined' is not assignable to parameter of type 'Element'. Type 'undefined' is not assignable to type 'Element'. Argument of type 'VNode[] | undefined' is not assignable to parameter of type 'VNode[]'. Type 'undefined' is not assignable to type 'VNode[]'. Argument of type 'null | undefined' is not assignable to parameter of type 'ChildType'. Type 'undefined' is not assignable to type 'ChildType'. Argument of type 'VNode | null' is not assignable to parameter of type 'ChildType'. Type 'null' is not assignable to type 'ChildType'. Argument of type 'VNode | undefined' is not assignable to parameter of type 'ChildType'. Type 'undefined' is not assignable to type 'ChildType'. Argument of type 'VNode | null | undefined' is not assignable to parameter of type 'ChildType'. Type 'undefined' is not assignable to type 'ChildType'. Argument of type 'null | undefined' is not assignable to parameter of type 'ChildType'. Argument of type 'RenderNode | undefined' is not assignable to parameter of type 'Node | null'. Type 'undefined' is not assignable to type 'Node | null'. Argument of type 'VNode | undefined' is not assignable to parameter of type 'VNode'. Type 'undefined' is not assignable to type 'VNode'. Argument of type 'null' is not assignable to parameter of type 'VNode'. Argument of type 'RenderNode | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'null' is not assignable to parameter of type 'RenderNode'. Argument of type 'ScreenshotDiff | undefined' is not assignable to parameter of type 'ScreenshotDiff'. Type 'undefined' is not assignable to type 'ScreenshotDiff'. Argument of type 'string | undefined' is not assignable to parameter of type 'PathLike'. Type 'undefined' is not assignable to type 'PathLike'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | SemVer'. Type 'undefined' is not assignable to type 'string | SemVer'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | SemVer'. Argument of type 'null' is not assignable to parameter of type 'number | undefined'. Argument of type 'null' is not assignable to parameter of type 'number | PromiseLike'. Argument of type 'CompilerWorkerTask | undefined' is not assignable to parameter of type 'CompilerWorkerTask'. Type 'undefined' is not assignable to type 'CompilerWorkerTask'. Argument of type 'null' is not assignable to parameter of type 'CompilerWorkerTask'. Argument of type 'undefined' is not assignable to parameter of type 'ErrorHandler'. Argument of type 'string | undefined' is not assignable to parameter of type 'MockRequestInfo'. Type 'undefined' is not assignable to type 'MockRequestInfo'. Argument of type 'string | undefined' is not assignable to parameter of type 'MockRequestInfo'. Argument of type 'MockResponse | undefined' is not assignable to parameter of type 'MockResponse'. Type 'undefined' is not assignable to type 'MockResponse'. Argument of type 'RuntimeRef | undefined' is not assignable to parameter of type 'RuntimeRef'. Type 'undefined' is not assignable to type 'RuntimeRef'. Argument of type 'this' is not assignable to parameter of type 'E2EElementInternal'. Type 'E2EElement' is not assignable to type 'E2EElementInternal'. Types of property 'find' are incompatible. Type '(selector: string) => Promise<E2EElement | null>' is not assignable to type '(selector: FindSelector) => Promise'. Argument of type '(elm: Element, pseudoElt: string) => any' is not assignable to parameter of type 'string | EvaluateFunc<[ElementHandle, string | null | undefined]>'. Type '(elm: Element, pseudoElt: string) => any' is not assignable to type 'EvaluateFunc<[ElementHandle, string | null | undefined]>'. Types of parameters 'pseudoElt' and 'params_1' are incompatible. Type 'string | null | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'this' is not assignable to parameter of type 'E2EElementInternal'. Argument of type '{ viewport: EmulateViewport | undefined; userAgent: string | undefined; }' is not assignable to parameter of type 'Device'. Types of property 'userAgent' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'null' is not assignable to parameter of type 'SourceMap | undefined'. Argument of type '{ tags: never[]; text: string; } | null | undefined' is not assignable to parameter of type 'CompilerJsDoc | undefined'. Type 'null' is not assignable to type 'CompilerJsDoc | undefined'. |
TS18048 | 575 | Error messages'config.sys' is possibly 'undefined'.'sys.details' is possibly 'undefined'. 'details' is possibly 'undefined'. 'config.devServer' is possibly 'undefined'. 'config.sys.getDevServerExecutingPath' is possibly 'undefined'. 'config.sys.lazyRequire' is possibly 'undefined'. 'sys.parseYarnLockFile' is possibly 'undefined'. 'scope.styleEl' is possibly 'undefined'. 'moduleFile' is possibly 'undefined'. 'config.extras' is possibly 'undefined'. 'config.logger' is possibly 'undefined'. 'hmr' is possibly 'undefined'. 'config.outputTargets' is possibly 'undefined'. 'c.moduleFiles' is possibly 'undefined'. 'a.name' is possibly 'undefined'. 'b.name' is possibly 'undefined'. 'orgNodeResolveId' is possibly 'undefined'. 'config.rollupPlugins' is possibly 'undefined'. 'config.rollupConfig' is possibly 'undefined'. 'config.rollupConfig.inputOptions' is possibly 'undefined'. 'compilerCtx.worker' is possibly 'undefined'. 'pluginTransforms.dependencies' is possibly 'undefined'. 'lastModified' is possibly 'undefined'. 'config.devServer.historyApiFallback' is possibly 'undefined'. 'inputConfig.devServer' is possibly 'undefined'. 'inputConfig.flags' is possibly 'undefined'. 'userConfig.flags' is possibly 'undefined'. 'www' is possibly 'undefined'. 'outputTarget' is possibly 'undefined'. 'o' is possibly 'undefined'. 'cmp' is possibly 'undefined'. 'deps' is possibly 'undefined'. 'cmp.directDependents' is possibly 'undefined'. 'cmp.dependents' is possibly 'undefined'. 'config.bundles' is possibly 'undefined'. 'c.dependencies' is possibly 'undefined'. 'c.directDependencies' is possibly 'undefined'. 'outputTargets' is possibly 'undefined'. 'opts' is possibly 'undefined'. 'errorLine.text' is possibly 'undefined'. 'errorLine.errorLength' is possibly 'undefined'. 'opts.format' is possibly 'undefined'. 'entryModule' is possibly 'undefined'. 'a.directDependents' is possibly 'undefined'. 'b.directDependents' is possibly 'undefined'. 'a.directDependencies' is possibly 'undefined'. 'b.directDependencies' is possibly 'undefined'. 'a.dependents' is possibly 'undefined'. 'b.dependents' is possibly 'undefined'. 'a.dependencies' is possibly 'undefined'. 'b.dependencies' is possibly 'undefined'. 'bundleOptions.loader' is possibly 'undefined'. 'pluginCtx.config.plugins' is possibly 'undefined'. 'transformResults.id' is possibly 'undefined'. 'transformResults.dependencies' is possibly 'undefined'. 'transformResults.diagnostics' is possibly 'undefined'. 'config.maxConcurrentWorkers' is possibly 'undefined'. 'hydrateOpts.staticComponents' is possibly 'undefined'. 'sys.generateFileHash' is possibly 'undefined'. 'manager.config.logger' is possibly 'undefined'. 'manager.config.sys' is possibly 'undefined'. 'serviceWorker' is possibly 'undefined'. 'node.comment' is possibly 'undefined'. 'node.selectors' is possibly 'undefined'. 'node.values' is possibly 'undefined'. 'moduleId' is possibly 'undefined'. 'sys' is possibly 'undefined'. 'tsResults.diagnostics' is possibly 'undefined'. 'r.resolvedModule' is possibly 'undefined'. 'results' is possibly 'undefined'. 'compilerSystem.watchDirectory' is possibly 'undefined'. 'compilerSystem.watchFile' is possibly 'undefined'. 'collectionManifest.bundles' is possibly 'undefined'. 'cstrMethod.body' is possibly 'undefined'. 'cmp.dependencies' is possibly 'undefined'. 'foundDep' is possibly 'undefined'. 'connectedCallback.body' is possibly 'undefined'. 'cmpNode.name' is possibly 'undefined'. 'symbol.declarations' is possibly 'undefined'. 'signature' is possibly 'undefined'. 'collection.moduleFiles' is possibly 'undefined'. 'tsSourceFiles' is possibly 'undefined'. 'results.data' is possibly 'undefined'. 'results.imports' is possibly 'undefined'. 'transformers.before' is possibly 'undefined'. 'transformers.afterDeclarations' is possibly 'undefined'. 'transformers.after' is possibly 'undefined'. 'msg.requestLog' is possibly 'undefined'. 'msg.error' is possibly 'undefined'. 'msg.buildResults' is possibly 'undefined'. 'a.priority' is possibly 'undefined'. 'b.priority' is possibly 'undefined'. 'devServerConfig.historyApiFallback' is possibly 'undefined'. 'devServerConfig.basePath' is possibly 'undefined'. 'req.pathname' is possibly 'undefined'. 'req.stats' is possibly 'undefined'. 'devServerConfig' is possibly 'undefined'. 'res.$content' is possibly 'undefined'. 'opts.maxHydrateCount' is possibly 'undefined'. 'ref' is possibly 'undefined'. 'opts.excludeComponents' is possibly 'undefined'. 'hostRef' is possibly 'undefined'. 'hostRef.$instanceValues$' is possibly 'undefined'. 'ref.$onInstancePromise$' is possibly 'undefined'. 'ref.$lazyInstance$' is possibly 'undefined'. 'opts.indentSpaces' is possibly 'undefined'. 'opts.approximateLineWidth' is possibly 'undefined'. 'plt.$orgLocNodes$' is possibly 'undefined'. 'hostRef.$lazyInstance$' is possibly 'undefined'. 'cmpMeta.$attrsToReflect$' is possibly 'undefined'. 'cmpMeta.$members$' is possibly 'undefined'. 'elm' is possibly 'undefined'. 'hostRef.$renderCount$' is possibly 'undefined'. 'childrenPromises' is possibly 'undefined'. 'hostRef.$hostElement$' is possibly 'undefined'. 'nodeRef' is possibly 'undefined'. 'hostElm' is possibly 'undefined'. 'screenshot.diff' is possibly 'undefined'. 'screenshotCache.items' is possibly 'undefined'. 'a.width' is possibly 'undefined'. 'b.width' is possibly 'undefined'. 'a.height' is possibly 'undefined'. 'b.height' is possibly 'undefined'. 'a.id' is possibly 'undefined'. 'b.id' is possibly 'undefined'. 'emulateConfig.viewport' is possibly 'undefined'. 'emulateConfig.viewport.deviceScaleFactor' is possibly 'undefined'. 'res.statusCode' is possibly 'undefined'. 'tsSysWatchDirectory' is possibly 'undefined'. 'tsSysWatchFile' is possibly 'undefined'. 'sys.events' is possibly 'undefined'. 't.retries' is possibly 'undefined'. 'testing.emulate' is possibly 'undefined'. 'parsedConfig.collectCoverageFrom' is possibly 'undefined'. 'compare.width' is possibly 'undefined'. 'compare.deviceScaleFactor' is possibly 'undefined'. 'compare.height' is possibly 'undefined'. 'config' is possibly 'undefined'. 'screenshotEmulate.viewport' is possibly 'undefined'. 'd.absFilePath' is possibly 'undefined'. 'd.code' is possibly 'undefined'. |
TS2322 | 506 | Error messagesType 'string | null | undefined' is not assignable to type 'string'.Type 'undefined' is not assignable to type 'string'. Type 'null' is not assignable to type 'DevServerConfig | undefined'. Type 'boolean | null | undefined' is not assignable to type 'boolean | undefined'. Type 'null' is not assignable to type 'boolean | undefined'. Type 'null' is not assignable to type 'DevServer'. Type 'undefined' is not assignable to type 'ComponentConstructor | Promise'. Type 'HTMLElement | null' is not assignable to type 'HTMLElement'. Type 'null' is not assignable to type 'HTMLElement'. Type '({ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; } | { ...; })[]' is not assignable to type 'RollupResult[]'. Type '{ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; } | { ...; }' is not assignable to type 'RollupResult'. Type '{ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; }' is not assignable to type 'RollupResult'. Type '{ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; }' is not assignable to type 'RollupChunkResult'. Types of property 'moduleFormat' are incompatible. Type 'ModuleFormat | undefined' is not assignable to type 'ModuleFormat'. Type 'undefined' is not assignable to type 'ModuleFormat'. Type 'null' is not assignable to type 'CompilerBuildResults'. Type 'undefined' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'Document'. Type 'null' is not assignable to type 'Promise'. Type 'null' is not assignable to type 'LoggerTimeSpan'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. Type 'boolean | "prod" | undefined' is not assignable to type 'boolean | "prod"'. Type 'undefined' is not assignable to type 'boolean | "prod"'. Type 'BuildResultsComponentGraph | undefined' is not assignable to type 'BuildResultsComponentGraph'. Type 'undefined' is not assignable to type 'BuildResultsComponentGraph'. Type 'RollupResults | undefined' is not assignable to type 'RollupResults'. Type 'undefined' is not assignable to type 'RollupResults'. Type '{ name: string | undefined; source: string; tags: any[]; }[]' is not assignable to type '{ name: string; source: string; tags: string[]; }[]'. Type '{ name: string | undefined; source: string; tags: any[]; }' is not assignable to type '{ name: string; source: string; tags: string[]; }'. Types of property 'name' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'null' is not assignable to type 'CompilerWorkerContext'. Type 'null' is not assignable to type 'WatchOfConfigFile'. Type 'null' is not assignable to type 'Promise<(void | void[])[]>'. Type 'Promise<(void | void[] | null)[]>' is not assignable to type 'Promise<(void | void[])[]>'. Type '(void | void[] | null)[]' is not assignable to type '(void | void[])[]'. Type 'void | void[] | null' is not assignable to type 'void | void[]'. Type 'null' is not assignable to type 'void | void[]'. Type 'null' is not assignable to type '{ program: WatchOfConfigFile; rebuild: () => void; }'. Type '(this: PluginContext, importee: string, importer: string) => Promise' is not assignable to type 'ResolveIdHook'. Types of parameters 'importer' and 'importer' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '(this: PluginContext, importee: string, importer: string) => Promise' is not assignable to type 'ResolveIdHook'. Types of parameters 'importer' and 'importer' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string | undefined'. Type '{ code: string; exports: string[]; workerMsgId: string; dependencies: string[]; } | null' is not assignable to type 'WorkerMeta | undefined'. Type 'null' is not assignable to type 'WorkerMeta | undefined'. Type 'WorkerMeta | undefined' is not assignable to type 'WorkerMeta'. Type 'undefined' is not assignable to type 'WorkerMeta'. Type 'CompilerSystem | undefined' is not assignable to type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. Type 'Logger | undefined' is not assignable to type 'Logger'. Type 'undefined' is not assignable to type 'Logger'. Type 'import("/home/runner/work/stencil/stencil/src/compiler/cache").Cache' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/declarations/stencil-private").Cache'. The types returned by 'get(...)' are incompatible between these types. Type 'Promise<string | null>' is not assignable to type 'Promise'. Type 'null' is not assignable to type 'ValidatedConfig'. Type 'null' is not assignable to type 'Config'. Type 'null' is not assignable to type 'string[]'. Type '{ dir: string; buildDir: string; collectionDir: string | null; typesDir: string; esmLoaderPath: string; copy: d.CopyTask[]; polyfills: boolean | undefined; empty: boolean; transformAliasedImportPathsInCollection: boolean; type: "dist"; }' is not assignable to type 'Required'. Types of property 'polyfills' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'null' is not assignable to type 'number | undefined'. Type 'null' is not assignable to type 'HistoryApiFallback | undefined'. Type 'null' is not assignable to type 'CopyTask[] | undefined'. Type '{ dirPath: string; filePath: string; fileName: string; readmePath: string; usagesDir: string; tag: string; readme: string | undefined; overview: string; usage: JsonDocsUsage; ... 13 more ...; listeners: JsonDocsListener[]; }[]' is not assignable to type 'JsonDocsComponent[]'. Type '{ dirPath: string; filePath: string; fileName: string; readmePath: string; usagesDir: string; tag: string; readme: string | undefined; overview: string; usage: d.JsonDocsUsage; docs: string; ... 12 more ...; listeners: d.JsonDocsListener[]; }' is not assignable to type 'JsonDocsComponent'. Types of property 'readme' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'string[] | undefined' is not assignable to type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. Type '{ name: string; type: string; mutable: boolean; attr: string | undefined; reflectToAttr: boolean; docs: string; docsTags: CompilerJsDocTagInfo[]; default: string | undefined; deprecation: string | undefined; values: JsonDocsValue[]; optional: boolean; required: boolean; }[]' is not assignable to type 'JsonDocsProp[]'. Type '{ name: string; type: string; mutable: boolean; attr: string | undefined; reflectToAttr: boolean; docs: string; docsTags: d.CompilerJsDocTagInfo[]; default: string | undefined; deprecation: string | undefined; values: d.JsonDocsValue[]; optional: boolean; required: boolean; }' is not assignable to type 'JsonDocsProp'. Types of property 'default' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '{ name: string; type: string; mutable: false; attr: string; reflectToAttr: false; docs: string; docsTags: never[]; default: undefined; deprecation: undefined; values: JsonDocsValue[]; optional: true; required: false; }[]' is not assignable to type 'JsonDocsProp[]'. Type '{ name: string; type: string; mutable: false; attr: string; reflectToAttr: false; docs: string; docsTags: never[]; default: undefined; deprecation: undefined; values: d.JsonDocsValue[]; optional: true; required: false; }' is not assignable to type 'JsonDocsProp'. Types of property 'default' are incompatible. Type 'undefined' is not assignable to type 'string'. Type '(ComponentCompilerMeta | undefined)[]' is not assignable to type 'ComponentCompilerMeta[]'. Type 'ComponentCompilerMeta | undefined' is not assignable to type 'ComponentCompilerMeta'. Type 'undefined' is not assignable to type 'ComponentCompilerMeta'. Type '(ComponentCompilerMeta | undefined)[][]' is not assignable to type 'readonly ComponentCompilerMeta[][]'. Type '(ComponentCompilerMeta | undefined)[]' is not assignable to type 'ComponentCompilerMeta[]'. Type 'null' is not assignable to type 'boolean | SourceMapOptions | undefined'. Type 'null' is not assignable to type 'SourceMap | undefined'. Type '{ name: string | undefined; tags: string[]; }[]' is not assignable to type 'CollectionDependencyData[]'. Type '{ name: string | undefined; tags: string[]; }' is not assignable to type 'CollectionDependencyData'. Types of property 'name' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'string | undefined' is not assignable to type 'string | number'. Type 'undefined' is not assignable to type 'string | number'. Type 'SourceMap | undefined' is not assignable to type 'SourceMap'. Type 'undefined' is not assignable to type 'SourceMap'. Type 'string | null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'Function'. Type 'null' is not assignable to type 'Map<string, string[]>'. Type 'null' is not assignable to type 'PrerenderConfig'. Type 'null' is not assignable to type 'Set'. Type 'null' is not assignable to type 'HydrateAnchorElement[]'. Type 'null' is not assignable to type '(prerenderRequest: PrerenderUrlRequest) => Promise'. Type 'CssNode | null' is not assignable to type 'void | CssNode'. Type 'null' is not assignable to type 'void | CssNode'. Type 'CssNode | null' is not assignable to type 'CssNode'. Type 'null' is not assignable to type 'CssNode'. Type 'CssNode | null' is not assignable to type 'void | CssNode'. Type 'RegExpExecArray | null' is not assignable to type 'RegExpExecArray'. Type 'null' is not assignable to type 'RegExpExecArray'. Type 'null' is not assignable to type '() => string'. Type 'null' is not assignable to type 'number'. Type 'null' is not assignable to type 'boolean'. Type 'null' is not assignable to type 'boolean | undefined'. Type 'FsItem | undefined' is not assignable to type 'FsItem'. Type 'undefined' is not assignable to type 'FsItem'. Type 'null' is not assignable to type 'CompilerFileWatcherCallback[]'. Type '(key: string) => string | undefined' is not assignable to type '(key: string) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '(p: string) => Promise<string | undefined>' is not assignable to type '{ (p: string): Promise; (p: string, encoding: "utf8"): Promise; (p: string, encoding: "binary"): Promise; }'. Type 'Promise<string | undefined>' is not assignable to type 'Promise'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '(p: string) => string | undefined' is not assignable to type '(p: string, encoding?: string | undefined) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '((maxConcurrentWorkers: number) => WorkerMainController) | null' is not assignable to type '((maxConcurrentWorkers: number) => WorkerMainController) | undefined'. Type 'null' is not assignable to type '((maxConcurrentWorkers: number) => WorkerMainController) | undefined'. Type 'null' is not assignable to type 'ResolvedModuleWithFailedLookupLocations'. Type 'null' is not assignable to type 'Worker'. Type 'CollectionCompilerMeta | undefined' is not assignable to type 'CollectionCompilerMeta'. Type 'undefined' is not assignable to type 'CollectionCompilerMeta'. Type 'DeclarationName | undefined' is not assignable to type 'DeclarationName'. Type 'undefined' is not assignable to type 'DeclarationName'. Type 'boolean | null' is not assignable to type 'boolean'. Type 'null' is not assignable to type 'boolean'. Type 'undefined' is not assignable to type 'ComponentCompilerVirtualProperty'. Type '{ name: string; method: string; bubbles: boolean; cancelable: boolean; composed: boolean; docs: CompilerJsDoc; complexType: ComponentCompilerEventComplexType; internal: boolean | undefined; }[]' is not assignable to type 'ComponentCompilerEvent[]'. Type '{ name: string; method: string; bubbles: boolean; cancelable: boolean; composed: boolean; docs: d.CompilerJsDoc; complexType: d.ComponentCompilerEventComplexType; internal: boolean | undefined; }' is not assignable to type 'ComponentCompilerEvent'. Types of property 'internal' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type '{ name: string; docs: CompilerJsDoc; complexType: ComponentCompilerMethodComplexType; internal: boolean | undefined; }[]' is not assignable to type 'ComponentCompilerMethod[]'. Type '{ name: string; docs: d.CompilerJsDoc; complexType: d.ComponentCompilerMethodComplexType; internal: boolean | undefined; }' is not assignable to type 'ComponentCompilerMethod'. Types of property 'internal' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type '{ name: string; type: ComponentCompilerPropertyType; attribute: string | undefined; reflect: boolean; mutable: boolean; required: boolean; optional: boolean; defaultValue: string | undefined; complexType: ComponentCompilerPropertyComplexType; docs: CompilerJsDoc; internal: boolean | undefined; }[]' is not assignable to type 'ComponentCompilerProperty[]'. Type '{ name: string; type: d.ComponentCompilerPropertyType; attribute: string | undefined; reflect: boolean; mutable: boolean; required: boolean; optional: boolean; defaultValue: string | undefined; complexType: d.ComponentCompilerPropertyComplexType; docs: d.CompilerJsDoc; internal: boolean | undefined; }' is not assignable to type 'ComponentCompilerProperty'. Types of property 'internal' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'null' is not assignable to type 'ImportData'. Type 'undefined' is not assignable to type '"queryparams" | null'. Type 'null' is not assignable to type 'WeakSet'. Type 'null' is not assignable to type 'Module'. Type 'Module | undefined' is not assignable to type 'Module'. Type 'undefined' is not assignable to type 'Module'. Type 'undefined' is not assignable to type 'CompilerJsDoc'. Type '{ [x: string]: d.TypesMemberNameData[] | undefined; }' is not assignable to type 'TypesImportData'. 'string' index signatures are incompatible. Type 'TypesMemberNameData[] | undefined' is not assignable to type 'TypesMemberNameData[]'. Type 'undefined' is not assignable to type 'TypesMemberNameData[]'. Type 'string | undefined' is not assignable to type 'string | null'. Type '((data: { file: string; line: number; column: number; }) => void) | null' is not assignable to type 'OpenInEditorCallback | undefined'. Type 'null' is not assignable to type 'OpenInEditorCallback | undefined'. Type 'null' is not assignable to type 'WebSocket'. Type 'null' is not assignable to type 'BuildOnEventRemove'. Type 'null' is not assignable to type '() => void'. Type 'null' is not assignable to type '(msg: DevServerMessage) => void'. Type 'DevServerConfig | undefined' is not assignable to type 'DevServerConfig'. Type 'undefined' is not assignable to type 'DevServerConfig'. Type 'null' is not assignable to type '{ open(openId: string): Promise; }'. Type 'string | null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'Promise<DevServerEditor[]>'. Type 'null' is not assignable to type '(req: IncomingMessage, res: ServerResponse, next: () => void) => void'. Type 'null' is not assignable to type 'URL'. Type 'null' is not assignable to type 'URLSearchParams'. Type 'PageReloadStrategy | undefined' is not assignable to type 'PageReloadStrategy'. Type 'undefined' is not assignable to type 'PageReloadStrategy'. Type 'null' is not assignable to type 'Server<typeof IncomingMessage, typeof ServerResponse>'. Type 'null' is not assignable to type 'DevWebSocket'. Type 'null' is not assignable to type 'DevServerContext'. Type 'DevWebSocket | null' is not assignable to type 'DevWebSocket'. Type 'null' is not assignable to type 'DevWebSocket'. Type 'null' is not assignable to type 'ChildProcess'. Type 'null' is not assignable to type 'HydrateApp'. Type '() => undefined' is not assignable to type '{ (cb?: (() => void) | undefined): TestServerResponse; (chunk: any, cb?: (() => void) | undefined): TestServerResponse; (chunk: any, encoding: BufferEncoding, cb?: (() => void) | undefined): TestServerResponse; }'. Type 'undefined' is not assignable to type 'TestServerResponse'. Type 'null' is not assignable to type 'ComponentConstructor'. Type '(this: HostElement) => Promise | undefined' is not assignable to type '() => Promise'. Type 'Promise | undefined' is not assignable to type 'Promise'. Type 'undefined' is not assignable to type 'Promise'. Type 'null' is not assignable to type 'Window & typeof globalThis'. Type 'null' is not assignable to type 'Window'. Type 'null' is not assignable to type 'Window & typeof globalThis'. Type 'null' is not assignable to type 'MockCSSStyleSheet'. Type 'null' is not assignable to type 'string | boolean'. Type 'null' is not assignable to type 'Location'. Type 'null' is not assignable to type 'MockElement'. Type 'null' is not assignable to type 'SVGSVGElement'. Type 'null' is not assignable to type 'SVGElement'. Type 'null' is not assignable to type 'EventTarget'. Type 'null' is not assignable to type 'MockEventListener[]'. Type 'null' is not assignable to type 'MockDocument'. Type '{ name: string; value: string; namespace: string | null; prefix: null; }[]' is not assignable to type 'Attribute[]'. Type '{ name: string; value: string; namespace: string | null; prefix: null; }' is not assignable to type 'Attribute'. Types of property 'namespace' are incompatible. Type 'string | null' is not assignable to type 'string | undefined'. Type '(element: MockElement) => string | null' is not assignable to type '(element: unknown) => string'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Type 'ParentNode | null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'Document'. Type 'string | null | undefined' is not assignable to type 'string | undefined'. Type 'never[] | null' is not assignable to type 'RenderNode[]'. Type 'null' is not assignable to type 'RenderNode[]'. Type 'null' is not assignable to type 'VNode[]'. Type 'null' is not assignable to type 'string | number | undefined'. Type 'null' is not assignable to type 'string | number | Function'. Type 'RenderNode | null' is not assignable to type 'RenderNode'. Type 'null' is not assignable to type 'RenderNode'. Type 'HTMLElement | null' is not assignable to type 'EventTarget'. Type 'null' is not assignable to type 'EventTarget'. Type 'string | null | undefined' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'Set | undefined'. Type 'null' is not assignable to type '[string, any][] | undefined'. Type 'VNode[] | undefined' is not assignable to type 'VNode[]'. Type 'undefined' is not assignable to type 'VNode[]'. Type '(props: {}, children: VNode[], utils: FunctionalUtilities) => null' is not assignable to type 'FunctionalComponent<{}>'. Type 'null' is not assignable to type 'VNode | VNode[]'. Type '() => null' is not assignable to type 'FunctionalComponent<{}>'. Type 'null' is not assignable to type 'VNode | VNode[]'. Type 'null' is not assignable to type 'VNode'. Type 'undefined' is not assignable to type 'VNode'. Type 'RenderNode | undefined' is not assignable to type 'RenderNode'. Type 'undefined' is not assignable to type 'RenderNode'. Type 'RelocateNodeData | undefined' is not assignable to type 'RelocateNodeData'. Type 'undefined' is not assignable to type 'RelocateNodeData'. Type 'ChildNode | null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'ScreenshotBuild'. Type 'null' is not assignable to type 'ScreenshotCache'. Type 'null' is not assignable to type 'Buffer'. Type 'null' is not assignable to type 'Screenshot'. Type '(() => void) | undefined' is not assignable to type '() => any'. Type 'undefined' is not assignable to type '() => any'. Type '() => null' is not assignable to type '(opts: { rootDir: string; moduleId: string; path: string; }) => string'. Type 'null' is not assignable to type 'string'. Type '() => null' is not assignable to type '(opts: { moduleId: string; path?: string | undefined; version?: string | undefined; }) => string'. Type 'null' is not assignable to type 'string'. Type '() => string | undefined' is not assignable to type '() => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'number | null' is not assignable to type 'number'. Type 'null' is not assignable to type 'number'. Type 'any[] | undefined' is not assignable to type 'any[]'. Type 'undefined' is not assignable to type 'any[]'. Type 'boolean | null | undefined' is not assignable to type 'boolean | undefined'. Type 'null' is not assignable to type 'ConfigBundle[] | undefined'. Type 'null' is not assignable to type 'OutputTarget[] | undefined'. Type 'null' is not assignable to type 'TestingConfig | undefined'. Type 'null' is not assignable to type 'Cache'. Type 'null' is not assignable to type '{ access: (filePath: string) => Promise; accessSync: (filePath: string) => boolean; cancelDeleteDirectoriesFromDisk: (dirPaths: string[]) => void; cancelDeleteFilesFromDisk: (filePaths: string[]) => void; ... 17 more ...; writeFiles: (files: { ...; } | Map<...>, opts?: FsWriteOptions | undefined) => Promise...'. Type 'HostRef | undefined' is not assignable to type 'HostRef'. Type 'undefined' is not assignable to type 'HostRef'. Type 'Function | undefined' is not assignable to type 'Function'. Type 'undefined' is not assignable to type 'Function'. Type 'RafCallback | undefined' is not assignable to type 'Function'. Type 'undefined' is not assignable to type 'Function'. Type 'QueuedLoadModule | undefined' is not assignable to type 'QueuedLoadModule'. Type 'undefined' is not assignable to type 'QueuedLoadModule'. Type 'null' is not assignable to type 'ElementHandle'. Type 'null' is not assignable to type 'E2EPageInternal'. Type 'ElementHandle | null' is not assignable to type 'ElementHandle'. Type 'null' is not assignable to type 'ElementHandle'. Type 'ElementHandle | null' is not assignable to type 'ElementHandle'. Type 'null' is not assignable to type 'ElementHandle'. Type 'ElementHandle | null' is not assignable to type 'ElementHandle | null'. Type 'ElementHandle' is not assignable to type 'ElementHandle'. Type 'Node' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 114 more. Type 'null' is not assignable to type 'Promise<JSHandle>'. Type '(a?: any, b?: any) => Promise<ScreenshotDiff | undefined>' is not assignable to type '{ (): Promise; (description: string): Promise; (opts: ScreenshotOptions): Promise<...>; (description: string, opts: ScreenshotOptions): Promise<...>; }'. Type 'Promise<ScreenshotDiff | undefined>' is not assignable to type 'Promise'. Type 'ScreenshotDiff | undefined' is not assignable to type 'ScreenshotDiff'. Type 'undefined' is not assignable to type 'ScreenshotDiff'. Type 'null' is not assignable to type 'CompilerWatcher'. Type 'null' is not assignable to type 'Promise'. Type 'Browser | null' is not assignable to type 'Browser'. Type 'null' is not assignable to type 'Browser'. Type 'null' is not assignable to type 'ValidatedConfig'. Type 'null' is not assignable to type 'Browser'. Type 'null' is not assignable to type 'SourceMap'. Type 'null' is not assignable to type 'PackageJsonData'. Type 'null' is not assignable to type '{ [moduleId: string]: string; } | undefined'. |
TS18047 | 167 | Error messages'var1' is possibly 'null'.'configFileData' is possibly 'null'. 'canonicalLinkElm.parentNode' is possibly 'null'. 'link.parentNode' is possibly 'null'. 'href' is possibly 'null'. 'stencilScriptElm.parentNode' is possibly 'null'. 'attr' is possibly 'null'. 't.cmp' is possibly 'null'. 't.event' is possibly 'null'. 't.property' is possibly 'null'. 'appErrorElm.parentNode' is possibly 'null'. 'progressBar.parentNode' is possibly 'null'. 'serverProcess.stdout' is possibly 'null'. 'serverProcess.stderr' is possibly 'null'. 'node.nodeName' is possibly 'null'. 'element.nodeName' is possibly 'null'. 'nodeValue' is possibly 'null'. 'cloned' is possibly 'null'. 'clonedDiv' is possibly 'null'. 'clonedTemplate' is possibly 'null'. 'clonedTemplate.content.firstChild' is possibly 'null'. 'clonedTemplate.content.firstChild.textContent' is possibly 'null'. 'clonedWin' is possibly 'null'. 'titleElm' is possibly 'null'. 'doc.body.firstElementChild' is possibly 'null'. 'doc.body.firstElementChild.firstElementChild' is possibly 'null'. 'tmplElm.content.firstChild' is possibly 'null'. 'doc.firstElementChild' is possibly 'null'. 'doc.lastChild' is possibly 'null'. 'dstWin' is possibly 'null'. 'orgLocationNode.parentNode' is possibly 'null'. 'node.nodeValue' is possibly 'null'. 'node.parentNode' is possibly 'null'. 'appendAfter.parentNode' is possibly 'null'. 'hostElm.firstElementChild' is possibly 'null'. 'hostElm.lastElementChild' is possibly 'null'. 'nodeRef.nodeValue' is possibly 'null'. 'nodeRef.parentNode' is possibly 'null'. 'parentNode' is possibly 'null'. 'defaultHolder.parentNode' is possibly 'null'. 'nodeToRelocate.parentNode' is possibly 'null'. 'w' is possibly 'null'. 'elm.textContent' is possibly 'null'. 'rsp' is possibly 'null'. 'p.params' is possibly 'null'. 'head' is possibly 'null'. |
TS2532 | 61 | Error messagesObject is possibly 'undefined'. |
TS2454 | 45 | Error messagesVariable 'pkgJsonData' is used before being assigned.Variable 'minifyOpts' is used before being assigned. Variable 'workerCtrl' is used before being assigned. Variable 'timespan' is used before being assigned. Variable 'content' is used before being assigned. Variable 'compilerExe' is used before being assigned. Variable 'declarationOutputText' is used before being assigned. Variable 'outputText' is used before being assigned. Variable 'importResolvedFile' is used before being assigned. Variable 'win' is used before being assigned. Variable 'attrName' is used before being assigned. Variable 'oldValue' is used before being assigned. Variable 'newValue' is used before being assigned. Variable 'hostId' is used before being assigned. Variable 'promise' is used before being assigned. Variable 'textContent' is used before being assigned. Variable 'resolve' is used before being assigned. Variable 'opts' is used before being assigned. |
TS2722 | 39 | Error messagesCannot invoke an object which is possibly 'undefined'. |
TS2531 | 37 | Error messagesObject is possibly 'null'. |
TS2352 | 19 | Error messagesConversion of type 'null' to type 'CompilerSystem' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.Conversion of type 'null' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Conversion of type 'null' to type 'string[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Conversion of type '{ cmps: never[]; }' to type 'Module' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type '{ cmps: never[]; }' is missing the following properties from type 'Module': coreRuntimeApis, collectionName, dtsFilePath, excludeFromCollection, and 27 more. Conversion of type 'null' to type 'ScreenshotCache' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. |
TS2769 | 12 | Error messagesNo overload matches this call.Overload 1 of 2, '(type: keyof DocumentEventMap, listener: (this: Document, ev: PointerEvent | MouseEvent | UIEvent | Event | ErrorEvent | ... 13 more ... | WheelEvent) => any, options?: boolean | ... 1 more ... | undefined): void', gave the following error. Argument of type '"e"' is not assignable to parameter of type 'keyof DocumentEventMap'. Overload 2 of 2, '(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void', gave the following error. Argument of type 'null' is not assignable to parameter of type 'EventListenerOrEventListenerObject'. No overload matches this call. Overload 1 of 2, '(o: {}): string[]', gave the following error. Argument of type 'BuildResultsComponentGraph | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. Overload 2 of 2, '(o: object): string[]', gave the following error. Argument of type 'BuildResultsComponentGraph | undefined' is not assignable to parameter of type 'object'. Type 'undefined' is not assignable to type 'object'. No overload matches this call. Overload 1 of 4, '(object: {}, method: never): SpyInstance<never, never>', gave the following error. Argument of type 'CompilerWorkerContext | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. Overload 2 of 4, '(object: {}, method: never): SpyInstance<never, never>', gave the following error. Argument of type 'CompilerWorkerContext | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. No overload matches this call. The last overload gave the following error. Argument of type 'string | null' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. Type 'null' is not assignable to type '(substring: string, ...args: any[]) => string'. No overload matches this call. The last overload gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string | RegExp'. Type 'undefined' is not assignable to type 'string | RegExp'. No overload matches this call. Overload 1 of 2, '(configFileName: string, optionsToExtend: CompilerOptions | undefined, system: System, createProgram?: CreateProgram | undefined, reportDiagnostic?: DiagnosticReporter | undefined, reportWatchStatus?: WatchStatusReporter | undefined, watchOptionsToExtend?: WatchOptions | undefined, extraFileExtensions?: readonly FileExtensionInfo[] | undefined): WatchCompilerHostOfConfigFile<...>', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Overload 2 of 2, '(rootFiles: string[], options: CompilerOptions, system: System, createProgram?: CreateProgram | undefined, reportDiagnostic?: DiagnosticReporter | undefined, reportWatchStatus?: WatchStatusReporter | undefined, projectReferences?: readonly ProjectReference[] | undefined, watchOptions?: WatchOptions | undefined): WatchCompilerHostOfFilesAndCompilerOptions<...>', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. No overload matches this call. Overload 1 of 2, '(timeoutId: string | number | Timeout | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'string | number | Timeout | undefined'. Type 'null' is not assignable to type 'string | number | Timeout | undefined'. Overload 2 of 2, '(id: number | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'number | undefined'. Type 'null' is not assignable to type 'number | undefined'. No overload matches this call. Overload 1 of 2, '(timeoutId: string | number | Timeout | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'string | number | Timeout | undefined'. Overload 2 of 2, '(id: number | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'number | undefined'. No overload matches this call. Overload 1 of 3, '(p: string, encoding: "utf8"): Promise', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Overload 2 of 3, '(p: string, encoding: "binary"): Promise', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. No overload matches this call. Overload 1 of 2, '(values: [] | readonly unknown[]): Promise<unknown[] | []>', gave the following error. Argument of type 'Promise[] | undefined' is not assignable to parameter of type '[] | readonly unknown[]'. Type 'undefined' is not assignable to type '[] | readonly unknown[]'. Overload 2 of 2, '(values: Iterable<void | PromiseLike>): Promise<void[]>', gave the following error. Argument of type 'Promise[] | undefined' is not assignable to parameter of type 'Iterable<void | PromiseLike>'. Type 'undefined' is not assignable to type 'Iterable<void | PromiseLike>'. |
TS2790 | 10 | Error messagesThe operand of a 'delete' operator must be optional. |
TS2538 | 8 | Error messagesType 'undefined' cannot be used as an index type.Type 'null' cannot be used as an index type. |
TS2344 | 5 | Error messagesType 'T' does not satisfy the constraint 'Answers'. |
TS2416 | 5 | Error messagesProperty 'get' in type 'Cache' is not assignable to the same property in base type 'Cache'.Type '(key: string) => Promise<string | null>' is not assignable to type '(key: string) => Promise'. Type 'Promise<string | null>' is not assignable to type 'Promise'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Property 'getMemoryStats' in type 'Cache' is not assignable to the same property in base type 'Cache'. Type '() => string | null' is not assignable to type '() => string'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Property 'find' in type 'E2EElement' is not assignable to the same property in base type 'E2EElementInternal'. Type '(selector: string) => Promise<E2EElement | null>' is not assignable to type '(selector: FindSelector) => Promise'. Type 'Promise<E2EElement | null>' is not assignable to type 'Promise'. Type 'E2EElement | null' is not assignable to type 'E2EElement'. Type 'null' is not assignable to type 'E2EElement'. Property 'findAll' in type 'E2EElement' is not assignable to the same property in base type 'E2EElementInternal'. Type '(selector: string) => Promise<E2EElement[]>' is not assignable to type '(selector: FindSelector) => Promise<E2EElement[]>'. Type 'Promise<import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-element").E2EElement[]>' is not assignable to type 'Promise<import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-declarations").E2EElement[]>'. Type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-element").E2EElement[]' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-declarations").E2EElement[]'. Type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-element").E2EElement' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-declarations").E2EElement'. The types returned by 'find(...)' are incompatible between these types. Type 'Promise<E2EElement | null>' is not assignable to type 'Promise'. Property 'getComputedStyle' in type 'E2EElement' is not assignable to the same property in base type 'E2EElementInternal'. Type '(pseudoElt?: string | null | undefined) => Promise' is not assignable to type '(pseudoElt?: string | null | undefined) => Promise'. Type 'Promise' is not assignable to type 'Promise'. Type 'unknown' is not assignable to type 'CSSStyleDeclaration'. |
TS18049 | 3 | Error messages'scriptElm' is possibly 'null' or 'undefined'. |
TS2493 | 3 | Error messagesTuple type '[]' of length '0' has no element at index '0'. |
TS2488 | 2 | Error messagesType 'Diagnostic[] | undefined' must have a 'Symbol.iterator' method that returns an iterator.Type 'string[] | undefined' must have a 'Symbol.iterator' method that returns an iterator. |
TS2774 | 2 | Error messagesThis condition will always return true since this function is always defined. Did you mean to call it instead? |
TS18046 | 2 | Error messages'style' is of type 'unknown'. |
TS2684 | 1 | Error messagesThe 'this' context of type 'ResolveIdHook | undefined' is not assignable to method's 'this' of type 'Function'.Type 'undefined' is not assignable to type 'Function'. |
TS2464 | 1 | Error messagesA computed property name must be of type 'string', 'number', 'symbol', or 'any'. |
TS2430 | 1 | Error messagesInterface 'SerializeOpts' incorrectly extends interface 'SerializeCssOptions'.Types of property 'usedSelectors' are incompatible. Type 'UsedSelectors | null' is not assignable to type 'UsedSelectors | undefined'. Type 'null' is not assignable to type 'UsedSelectors | undefined'. |
Unused exports report
There are 10 unused exports on this PR. That's the same number of errors on main, so at least we're not creating new ones!
Unused exports
File | Line | Identifier |
---|---|---|
src/runtime/bootstrap-lazy.ts | 15 | setNonce |
src/screenshot/screenshot-fs.ts | 18 | readScreenshotData |
src/testing/testing-utils.ts | 186 | withSilentWarn |
src/compiler/app-core/app-data.ts | 3 | BUILD |
src/compiler/app-core/app-data.ts | 92 | Env |
src/compiler/app-core/app-data.ts | 94 | NAMESPACE |
src/compiler/fs-watch/fs-watch-rebuild.ts | 111 | updateCacheFromRebuild |
src/testing/platform/testing-platform.ts | 30 | cssVarShim |
src/testing/puppeteer/puppeteer-declarations.ts | 485 | WaitForEventOptions |
src/client/polyfills/css-shim/utils.ts | 2 | GLOBAL_SCOPE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one little note
* @param sourceFilePath the path to the source file being visited | ||
* @returns a visitor which takes a node and optionally transforms imports | ||
*/ | ||
const visit = (compilerHost: ts.CompilerHost, transformCtx: ts.TransformationContext, sourceFilePath: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this 'visitor' is closely based on the one found in https://github.com/ionic-team/stencil/blob/main/src/compiler/transformers/map-imports-to-path-aliases.ts. It's basically just been modified to not be dependent on output target-specific stuff.
56fafe6
to
fd57729
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, things are looking good and I'm on board with doing these transformations globally (if they don't break any output we generate obviously). Called out a couple small things (mostly suggestions/thoughts).
I'll test this out on a few things locally too.
Do we need the specific transformer from #3523 anymore with this change? I guess that one would still have an impact if you set transformAliasedImportPaths: false
in the Stencil config, but had transformAliasedImportPaths: true
in the dist-collection
output target config. We may want to think about that behavior a bit since it feels confusing to have the same flag/control available at different levels
package.json
Outdated
@@ -114,7 +114,7 @@ | |||
"path-browserify": "^1.0.1", | |||
"pixelmatch": "5.3.0", | |||
"postcss": "^8.2.8", | |||
"prettier": "2.8.3", | |||
"prettier": "2.8.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this change found it's way into this PR 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a case of v3.1-feature being created before we updated Prettier, but this feature branch being created with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I agree, we should rm this (likely by rebasing the 3.1 feature branch on main
, then this off the 3.1 feature branch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops haha
I should inspect the diff before I open the PR!
@@ -0,0 +1,152 @@ | |||
import { normalizePath } from '@utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not about this line, just a general comment about the file. Can we update the name of this file to be kebab-case instead of snake-case (i.e. rewrite-aliased-paths.ts
)
* | ||
* @returns a TypeScript transformer factory | ||
*/ | ||
export function rewriteAliasedDTSPaths(): ts.TransformerFactory<ts.Bundle | ts.SourceFile> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought, but what do you think about a function name like rewriteAliasedDTSImportPaths()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit on the long side, but I'm fine with it 👍
* | ||
* @returns a TypeScript transformer factory | ||
*/ | ||
export const rewriteAliasedSourceFilePaths = (): ts.TransformerFactory<ts.SourceFile> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same idea as above: rewriteAliasedSourceFileImportPaths
Also, just feels strange one of these is a function
and one a const
... makes no functional difference, just something I noticed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, consistency is fine by me!
d23da4d
to
6ecf460
Compare
ok I had some scratch work on this branch about trying to do the same thing in tests, and when trying to remove that I messed up the rebase (oops) so the easiest thing was to just re-push as a single new commit - sorry for losing the history! @tanner-reits I made the changes you suggested |
Also to answer your question, I believe if you have the global I think my preference would be to have one global option, since it's not clear to me that you'd want to set this differently on a per-output-target basis, but I think if we wanted to do that we would need to first mark the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a few questions/clarifications - once those are resolved, can we add:
- Documentation in the
next
directory of docs - Notion page for flags that we may flip in the future for a major version of Stencil (like we did for v3?)
- Tests for
rewrite-aliased-paths
- I think using the
test/transpile
fn, we could just pass the new transformer to thetranspileModule()
fn
- I think using the
import { retrieveTsModifiers } from './transform-utils'; | ||
|
||
/** | ||
* Transform modules aliased with `paths` in `tsconfig.json` to relative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth saying this is updating import paths themselves:
* Transform modules aliased with `paths` in `tsconfig.json` to relative | |
* Transform module import paths aliased with `paths` in `tsconfig.json` to relative |
* This visitor function will modify any {@link ts.ImportDeclaration} nodes to | ||
* rewrite module identifiers which are configured using | ||
* the `paths` parameter in `tsconfig.json` from whatever name they are bound to | ||
* to a relative path from the importer to the importee. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, duplicate 'to' between this line and the previous one
* to a relative path from the importer to the importee. | |
* a relative path from the importer to the importee. |
* The TypeScript team have stated pretty unequivocally that they will not | ||
* automatically resolve these identifiers to relative paths in output code | ||
* {@see https://github.com/microsoft/TypeScript/issues/10866} and have | ||
* said that resolving these module identifiers is the responsability of module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* said that resolving these module identifiers is the responsability of module | |
* said that resolving these module identifiers is the responsibility of module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
man I do that one all the time
idk why, I feel like it should be response-ability I guess haha
} | ||
} | ||
|
||
return transformCtx.factory.updateImportDeclaration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move this updateImportDeclaration
call to be inside the conditional that checks if the importPath
starts with a period? Otherwise, aren't we doing work updating the import declaration that we don't need to do (and should just return the node as it was)?
); | ||
} | ||
|
||
return ts.visitEachChild(node, visit(compilerHost, transformCtx, sourceFilePath), transformCtx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure I understand, is there a way for import declarations to occur somewhere other than the outermost scope of a TypeScript file? If so, I think this totally makes sense to recurse and update all import declarations. I think I'm just having a little brain fog this morning and can't think of a place where it'd be allowed.
I know that we can do dynamic imports like:
import 'foo'; // <--- import declaration
async function bar() {
await import("baz"); // <-- AwaitExpression (CallExpression (ImportKeyword StringLiteral))
}
but those appear to be call expr's in TS AST explorer. Is there something I'm not thinking of? (Probably 😅)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't need to recurse, we might be able do something like:
export function rewriteAliasedDTSImportPaths_RyanTest(): ts.TransformerFactory<ts.Bundle | ts.SourceFile> {
return (transformCtx: ts.TransformationContext) => {
return (tsBundleOrSourceFile) => {
const tsSourceFile = ts.isBundle(tsBundleOrSourceFile)
? tsBundleOrSourceFile.getSourceFile()
: tsBundleOrSourceFile;
const s = tsSourceFile.statements;
const importStatements = s.filter(ts.isImportDeclaration);
// update logic for import declarations (nodes) getting updated
};
};
}
But I haven't fully tested that theory out, since I'm convinced I'm missing something in the first part above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I poked around a bit and found that the following (contrived) example does seem to be valid TypeScript:
namespace Foo {
export function foobar () {
return 2;
}
}
namespace Bar {
import foo = Foo;
export const baz = foo.foobar;
}
(TS playground link for that snippet)
However, if you take a look at the AST for that snippet, happily the import foo = Foo;
bit is not a ts.ImportDeclaration
, but a ts.ImportEqualsDeclaration
, and I don't think that TypeScript will allow a normal import declaration within a namespace (I could be wrong though). So that would suggest we could get by with filtering on the top-level statements in a ts.SourceFile
.
In the future, however, if the module declarations proposal get accepted as part of the ECMAScript standard (it's currently stage 2) then I think it would be possible to have something like this:
module Foo {
import fs from 'fs';
export const myFileSync = fs.readFileSync;
}
so in the interests of future-proofing we might want to keep the recursion around.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I struggle with this decision (or, my opinion on it 😆). IIUC, the module declarations proposal just hit Stage 2 this past November - I think I'd err on the side of YAGNI - and if we do need it in the future:
- This probably won't be the only change we'll need to make, and I can see value in looking at the solution for module declarations holistically
- We have git history, and can recover this original impl and reuse it if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense, it's not going to be that difficult to retrofit recursion back in if we turn out to need it.
I'm going to finish tests for the current implementation first and then look at swapping things out, just to have some assurance that things are working as I think they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright so I just pushed a change that did a bit of a refactor on the rewrite-aliased-paths
module to avoid recurring down the whole tree, lmk what you think!
// Create a regular expression that will be used to remove the last file extension | ||
// from the import path | ||
const extensionRegex = new RegExp( | ||
Object.values(ts.Extension) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This regex (I think) would look something like:
.ts$|.tsx$|.d.ts$|.js$|.jsx$|.json$|.tsbuildinfo$|.mjs$|.mts$|.d.mts$|.cjs$|.cts$|.d.cts$
Which I think is fine, as we're using ts.Extension
elsewhere in the codebase (the potential problem being that this enum is defined by TypeScript, and can change w/o us knowing). However, we've assumed that risk already, so I don't think that's much of a problem.
Does this current regex make sense for our purposes? I think so, but wanted to double check with the team as a whole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should work alright for us, and I'd rather that the TypeScript devs maintain it than us I think!
afterDeclarations: [], | ||
}; | ||
|
||
if (config.transformAliasedImportPaths) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this to src/compiler/transpile/transpile-module.ts#transpileModule
as well for single string compilation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that makes sense to me
c94c827
to
3dc0c4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just added tests, pointing out a few things with them
// can resolve, otherwise it won't find the module and won't | ||
// transform the module ID | ||
await compilerContext.fs.writeFile(path.join(config.rootDir, 'name/space.ts'), 'export const foo = x => x'); | ||
await compilerContext.fs.writeFile(path.join(config.rootDir, 'name/space/subdir.ts'), 'export const bar = x => x;'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in order for these tests to work TypeScript needs to be able to resolve the files we're importing from, so here in this little helper function we instantiate an in-memory FS and write two little modules to it. TypeScript is patched to read from the in-memory FS, so when we try to resolve modules in our transformer it will see these.
@@ -15,53 +17,67 @@ import { getScriptTarget } from '../transform-utils'; | |||
* @param compilerCtx a compiler context to use in the transpilation process | |||
* @param beforeTransformers TypeScript transformers that should be applied before the code is emitted | |||
* @param afterTransformers TypeScript transformers that should be applied after the code is emitted | |||
* @param afterDeclarations TypeScript transformers that should be applied | |||
* after declarations are generated | |||
* @param tsConfig optional typescript compiler options to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add these two options to 1) set the afterDeclarations
transformers and 2) override some of the TS compiler options set before the transpilation happens.
types: undefined, | ||
// add in possible default config overrides | ||
...tsConfig, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just the same as what was here before just alphabetized, reformatted as an object literal, and adding in the tsConfig
param.
legacyConnect, | ||
states, | ||
tagName, | ||
virtualProperties, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphabetization here too, only addition is declarationOutputText
cde6e00
to
f2fbac5
Compare
@alicewriteswrongs can you take a look at the unit tests again? Looks like they're failing in CI ATM |
ah looks like there's something that doesn't work correctly in node 14. I installed v14.21.3 locally and I can make the tests pass. I'll try to do some |
I'm not sure what's going on, I checked out |
definitely funky, so the tests on this branch all pass 100% (at least locally on my machine) with node v14.21.0, but if I use v14.21.1 I get test failures similar to the ones observable in the CI. The strange thing is, it looks like 14.21.1 was released in November: https://nodejs.org/en/download/releases/ (2022-11-04 to be specific) so I'm a little puzzled why we wouldn't have seen these issues before 🤔 |
actually scratch that, something is wrong on this branch - I wasn't doing a |
alright sorry for all the noise - turns out this was a probably with too-eagerly-enabling the transformer in |
39ca66d
to
897aa53
Compare
Looks like there is still a test failure but this time only on Windows, trying to dig into that a bit more. I'll ping when that's resolved. |
- use a simpler approach which early-returns nodes if the don't need to be transformed (this won't recur down the whole syntax tree for a file) - remove unnecessary extra function call for `rewriteAliasedDTSImportPaths` and `rewriteAliasedSourceFileImportPaths`
This reverts commit d0cf377.
rewriting behavior (we need this because we _don't_ want it to be on by default)
67f34fc
to
b8553bc
Compare
This adds support for transforming path aliases in spec tests, using the transformer which was added in #4042. Adding such support also revealed a bug with the existing path transformer, notably that it did not produce a valid path for sibling modules. See the diff for a comment explaining the details.
This adds support for transforming path aliases in spec tests, using the transformer which was added in #4042. Adding such support also revealed a bug with the existing path transformer, notably that it did not produce a valid path for sibling modules. See the diff for a comment explaining the details.
#4090) This adds support for transforming path aliases in spec tests, using the transformer which was added in #4042. Adding such support also revealed a bug with the existing path transformer, notably that it did not produce a valid path for sibling modules. See the diff for a comment explaining the details.
This adds documentation for the `transformAliasedImportPaths` option which was added to Stencil in the following PRs: - ionic-team/stencil#4042 (initial support) - ionic-team/stencil#4090 (spec support)
…on (#1046) This adds documentation for the `transformAliasedImportPaths` option which was added to Stencil in the following PRs: - ionic-team/stencil#4042 (initial support) - ionic-team/stencil#4090 (spec support)
#4090) This adds support for transforming path aliases in spec tests, using the transformer which was added in #4042. Adding such support also revealed a bug with the existing path transformer, notably that it did not produce a valid path for sibling modules. See the diff for a comment explaining the details.
#4090) This adds support for transforming path aliases in spec tests, using the transformer which was added in #4042. Adding such support also revealed a bug with the existing path transformer, notably that it did not produce a valid path for sibling modules. See the diff for a comment explaining the details.
This implements a transformer which is very similar to the one added
in #3523 but which is run earlier in the build process and which can
therefore rewrite aliased paths in both emitted JS and typedef files.
This matters if the user has the
generateTypeDeclarations
option setto
true
on one of their output targets.The new behavior implemented here, however, is no longer specific to a
particular output target, and applies to all TypeScript code which runs
through Stencil. Accordingly, the behavior is opt-in, and is controlled
by a new configuration value,
transformAliasedImportPaths
whichdefaults to
false
.Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm test
) were run locally and passednpm run test.karma.prod
) were run locally and passednpm run prettier
) was run locally and passedPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Currently if you use
paths
intsconfig.json
to set up module aliases then these are not transpiled in the.d.ts
files that Stencil emits for individual components. This is unfortunate! This PR introduces a transformer into the typescript compiler which will transform these paths from something like@utils
to a relative path from the importing module to the importee. This will allow the build output to be used directly without any need for further transformation.GitHub Issue Number: #3788
What is the new behavior?
Now such imports will be transformed at build time, so that emitted JS files and
.d.ts
files will have a resolved relative path to the module they're importing.Because this behavior
Does this introduce a breaking change?
Testing
The best way to test this is to check out the reproduction case on the linked issue and try building it with this change installed. You'll also need to add
transformAliasedImportPaths
on the stencil config.With that reproduction it might be helpful to also do something like:
then copy the contents of
dist
over and commit them before installing Stencil built from this branch. Then you can install Stencil from this branch and repeat the procedure to see a diff of the changes its produced.Other information