describe method

void describe(
  1. String name,
  2. FunctionDoc doc
)

Attaches documentation metadata to an exported name without the need to create a dedicated BuiltinFunction subclass.

Use this for constants, plain closures, or any value registered with define that does not override BuiltinFunction.doc.

Implementation

void describe(String name, FunctionDoc doc) {
  _library._docs[name] = doc;
}