MCPcopy Create free account
hub / github.com/stenciljs/core / buildError

Function buildError

src/utils/message-utils.ts:14–30  ·  view source on GitHub ↗
(diagnostics?: d.Diagnostic[])

Source from the content-addressed store, hash-verified

12 * @returns the created `Diagnostic`
13 */
14export const buildError = (diagnostics?: d.Diagnostic[]): d.Diagnostic => {
15 const diagnostic: d.Diagnostic = {
16 level: 'error',
17 type: 'build',
18 header: 'Build Error',
19 messageText: 'build error',
20 relFilePath: undefined,
21 absFilePath: undefined,
22 lines: [],
23 };
24
25 if (diagnostics) {
26 diagnostics.push(diagnostic);
27 }
28
29 return diagnostic;
30};
31
32/**
33 * Builds a template `Diagnostic` entity for a build warning. The created `Diagnostic` is returned, and have little

Callers 15

readPackageJsonFunction · 0.90
parsePackageJsonFunction · 0.90
buildJsonFileErrorFunction · 0.85
runPluginTransformsFunction · 0.85
validateUniqueTagNamesFunction · 0.85
outputCopyFunction · 0.85
resolveAndFlattenImportsFunction · 0.85
resolveCssNodeModuleFunction · 0.85
validateTsConfigFunction · 0.85
validateComponentFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected