Function Library Extension Files and Code

A function library is a manifest and an implementation file that describe the same set of functions:

  • A <name>.extension.ts file that holds the manifest, which declares each function's name, parameters, and return type.
  • A <name>.ts file that holds the implementation, the code that implements the functions.

Function libraries are currently only available for Studio Two sites.

Manifest

The <name>.extension.ts file holds the manifest.

The manifest includes:

  • functions: Functions the library exposes.
  • resources: Where the implementation code lives.

For example, a generated price-formatting library declares 1 function and points to its implementation file:

Copy

For the full manifest reference, see About the Function Library Manifest.

Implementation

The <name>.ts file holds the implementation.

It exports one function per entry in the manifest, matching it by name:

Copy

See also

Last updated: 2 November 2026

Did this help?