LegacyFunction<sync extends "sync" | "async">: sync extends "async"
    ? LegacySyncFunction | LegacyAsyncFunction
    : LegacySyncFunction

A callback that implements a custom Sass function. For renderSync, this must be a LegacySyncFunction which returns its result directly; for render, it may be either a LegacySyncFunction or a LegacyAsyncFunction which calls a callback with its result.

See functions for more details.


This only works with the legacy render and renderSync APIs. Use CustomFunction with compile, compileString, compileAsync, and compileStringAsync instead.

Type Parameters

  • sync extends "sync" | "async"