How do I set up another target for my extension

Topic summary

Problem setting up a second extension function for a checkout target (pos-checkout). The author follows a tutorial that says to create an extension function referencing a target and export it as a named export.

Current issue: A syntax error appears — “Expected identifier but found “purchase.checkout.shipping-option-item.details.render”” — when attempting to declare and export the function using a string as part of the function signature.

Context: The provided code snippet is central to understanding the error. It shows a function declaration with a target string and a callback inside the parameter list, which JavaScript/TypeScript interprets as invalid.

Clarifications: “target” refers to the extension point identifier (purchase.checkout.shipping-option-item.details.render) where the UI extension should render. “Named export” means exporting a symbol by name (e.g., export const … or export function …).

Status: No resolution yet; the author asks which correct approach/syntax to define and export another extension function.

Summarized with AI on January 3. AI used: gpt-5.

Hello!

I am following the tutorial for making a custom app, and it says to create an extension function that references my target, and export it using a named export. I am getting an error when doing it this way, which way am I supposed to be setting up another extension function?

// Set up entry point for another extension
export function extension2(
"purchase.checkout.shipping-option-item.details.render",
  (root, { settings }) => {
    //code here
  }
);

The error I am getting is

[ERROR] Expected identifier but found "\"purchase.checkout.shipping-option-item.details.render\""