# configuration/strings/source.strings.ts

> 21 lines of code and 7 definitions.

Tree: GovLab Quality
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/quality#file-quality-configuration-strings-source-strings-ts
Source text: https://banes-lab.com/source/quality/configuration/strings/source.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/quality/configuration/strings.md), after [configuration/strings/rule.strings.ts](https://banes-lab.com/source/quality/configuration/strings/rule.strings.ts.md) and before [configuration/strings/target.strings.ts](https://banes-lab.com/source/quality/configuration/strings/target.strings.ts.md).

## Definitions

- `jsSourceFailed` (lexical_declaration, line 1, exported)
- `declarationFailed` (lexical_declaration, line 5, exported)
- `builtTargetFailed` (lexical_declaration, line 9, exported)
- `jsGlobFailed` (lexical_declaration, line 13, exported)
- `jsConfigFailed` (lexical_declaration, line 17, exported)
- `distImportFailed` (lexical_declaration, line 21, exported)
- `tsOnlyClean` (lexical_declaration, line 25, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/quality/folder-quality-configuration-strings.md)

## Source

```typescript
export const jsSourceFailed = function jsSourceFailed(count: number): string {
    return `ts-only: ${String(count)} JavaScript-family source files exist. The project is TypeScript throughout, and only skipped build output may be JavaScript. Author each file as .ts:\n`;
};

export const declarationFailed = function declarationFailed(count: number): string {
    return `ts-only: ${String(count)} hand-authored .d.ts files exist. A hand-authored declaration loosens types that the real package or a .ts module owns. Delete each one and use the real types, through the package, a 'declare module' block inside a .ts module or a typed .ts wrapper:\n`;
};

export const builtTargetFailed = function builtTargetFailed(count: number): string {
    return `ts-only: ${String(count)} package.json main or exports targets resolve to built JavaScript. A workspace package ships its TypeScript source and no build. Point each target at the .ts source:\n`;
};

export const jsGlobFailed = function jsGlobFailed(count: number): string {
    return `ts-only: ${String(count)} JavaScript-family coverage globs sit in a consumer config, where the source is TypeScript only. Point each glob at .ts in govlab.config:\n`;
};

export const jsConfigFailed = function jsConfigFailed(count: number): string {
    return `ts-only: ${String(count)} tsconfig files set allowJs or checkJs, which TypeScript source never needs. Remove the option:\n`;
};

export const distImportFailed = function distImportFailed(count: number): string {
    return `ts-only: ${String(count)} source files import the workspace's own build output, which works only while a stale build exists. Import the source module directly:\n`;
};

export const tsOnlyClean = function tsOnlyClean(scanned: number): string {
    return `ts-only: clean. ${String(scanned)} files scanned, with no JavaScript-family source, no hand-authored .d.ts and no allowJs or checkJs option.\n`;
};
```
