UNPKG

@typespec/compiler

Version:

TypeSpec compiler and standard library

20 lines (18 loc) 469 B
import { createRule } from "@typespec/compiler"; export const noInterfaceRule = createRule({ name: "no-interface", severity: "warning", description: "Make sure interface are not used.", messages: { default: "Interface shouldn't be used with this library. Keep operations at the root.", }, create: (context) => { return { interface: (iface) => { context.reportDiagnostic({ target: iface, }); }, }; }, });