INNER CODE UNIT · TypeScript
getSuggestions
ben-rogerson/twin.macro · src/suggestions/index.ts:109
function getSuggestions(classList: string[], options: Options): void {
const context = { ...OPTION_DEFAULTS, ...options }
const color = makeColor(context.hasLogColors)
const classErrorContext = createErrorContext(color, context)
const errorText = classList
.map(c => getClassError(c, classErrorContext))
.join('\n\n')
const { twinVersion } = getPackageVersions()
const helpText = [
`${twinVersion ? `twin.macro@${twinVersion}` : 'twinVersion'}`,
`https://twinredirect.page.link/docs`,
`https://tailwindcss.com/docs`,
].join('\n')
throw new context.CustomError(