API reference@effx/compiler
problem-naming
API reference for @effx/compiler/problem-naming
problem-naming.ts overview
Exports Grouped by Category
utils
expandProblemIdentifier
Substitution is data-only; raw placeholders are never sanitized silently.
Signature
declare const expandProblemIdentifier: (pattern: string, group: string, key: string) => stringnameProblems
The prepass owns no resources and performs no IO. Only configured identifiers enter IR; the legacy default remains generator-owned so existing canonical bytes do not change. Collision state is local to this expansion, never retained across compilations. Explicit overrides are not derived names.
Signature
declare const nameProblems: (
declarations: ReadonlyArray<Declaration>,
pattern: string | undefined
) =>
| {
declarations: ReadonlyArray<{
readonly kind: "class" | "staticMethod" | "builder" | "model"
readonly module: string
readonly export: string
readonly id: string
readonly annotations: ReadonlyArray<{
readonly name: string
readonly args: ReadonlyArray<AnnotationArg>
readonly definition?:
{ readonly module: string; readonly export: string; readonly member?: string | undefined } | undefined
}>
readonly binding?: "external" | undefined
readonly member?: string | undefined
readonly handlerSignature?:
| {
readonly success:
| {
readonly _tag: "Schema"
readonly ref: {
readonly module: string
readonly export: string
readonly symbolId: string & Brand<"effx/StableId">
}
readonly httpStatus?: number | undefined
readonly errorTag?: string | undefined
}
| {
readonly _tag: "Service"
readonly id: string & Brand<"effx/StableId">
readonly symbol: {
readonly module: string
readonly export: string
readonly member?: string | undefined
}
}
| { readonly _tag: "Opaque"; readonly display: string }
readonly errors: ReadonlyArray<
| {
readonly _tag: "Schema"
readonly ref: {
readonly module: string
readonly export: string
readonly symbolId: string & Brand<"effx/StableId">
}
readonly httpStatus?: number | undefined
readonly errorTag?: string | undefined
}
| {
readonly _tag: "Service"
readonly id: string & Brand<"effx/StableId">
readonly symbol: {
readonly module: string
readonly export: string
readonly member?: string | undefined
}
}
| { readonly _tag: "Opaque"; readonly display: string }
>
readonly requirements: ReadonlyArray<
| {
readonly _tag: "Schema"
readonly ref: {
readonly module: string
readonly export: string
readonly symbolId: string & Brand<"effx/StableId">
}
readonly httpStatus?: number | undefined
readonly errorTag?: string | undefined
}
| {
readonly _tag: "Service"
readonly id: string & Brand<"effx/StableId">
readonly symbol: {
readonly module: string
readonly export: string
readonly member?: string | undefined
}
}
| { readonly _tag: "Opaque"; readonly display: string }
>
}
| undefined
readonly location?: { readonly file: string; readonly line: number; readonly col: number } | undefined
}>
diagnostics: Array<Diagnostic & { readonly code: "EFFX2412" }>
}
| {
declarations: Array<{
readonly kind: "class" | "staticMethod" | "builder" | "model"
readonly module: string
readonly export: string
readonly id: string
readonly annotations: ReadonlyArray<{
readonly name: string
readonly args: ReadonlyArray<AnnotationArg>
readonly definition?:
{ readonly module: string; readonly export: string; readonly member?: string | undefined } | undefined
}>
readonly binding?: "external" | undefined
readonly member?: string | undefined
readonly handlerSignature?:
| {
readonly success:
| {
readonly _tag: "Schema"
readonly ref: {
readonly module: string
readonly export: string
readonly symbolId: string & Brand<"effx/StableId">
}
readonly httpStatus?: number | undefined
readonly errorTag?: string | undefined
}
| {
readonly _tag: "Service"
readonly id: string & Brand<"effx/StableId">
readonly symbol: {
readonly module: string
readonly export: string
readonly member?: string | undefined
}
}
| { readonly _tag: "Opaque"; readonly display: string }
readonly errors: ReadonlyArray<
| {
readonly _tag: "Schema"
readonly ref: {
readonly module: string
readonly export: string
readonly symbolId: string & Brand<"effx/StableId">
}
readonly httpStatus?: number | undefined
readonly errorTag?: string | undefined
}
| {
readonly _tag: "Service"
readonly id: string & Brand<"effx/StableId">
readonly symbol: {
readonly module: string
readonly export: string
readonly member?: string | undefined
}
}
| { readonly _tag: "Opaque"; readonly display: string }
>
readonly requirements: ReadonlyArray<
| {
readonly _tag: "Schema"
readonly ref: {
readonly module: string
readonly export: string
readonly symbolId: string & Brand<"effx/StableId">
}
readonly httpStatus?: number | undefined
readonly errorTag?: string | undefined
}
| {
readonly _tag: "Service"
readonly id: string & Brand<"effx/StableId">
readonly symbol: {
readonly module: string
readonly export: string
readonly member?: string | undefined
}
}
| { readonly _tag: "Opaque"; readonly display: string }
>
}
| undefined
readonly location?: { readonly file: string; readonly line: number; readonly col: number } | undefined
}>
diagnostics: Array<Diagnostic>
}problemNamingIssue
Pure policy validation, shared by project loading and the source prepass.
Signature
declare const problemNamingIssue: (pattern: string) => string | undefined