• Example

    // config.json
    {
    "version": 1,
    "labels": {
    "labels_sample": ""
    },
    "contents": {
    "contents_sample": {
    "type": "asset"
    }
    }
    }

    // main.ts
    import { Showpad } from '@showpad/experience-app-sdk'

    interface ConfigJSON extends Showpad.ConfigJSON {
    labels: {
    labels_sample: Showpad.Label
    }
    contents: {
    contents_sample: Showpad.ContentAsset
    }
    }

    const configJSON = await Showpad.parseConfig<ConfigJSON>()

    Type Parameters

    • T extends ConfigJSON = ConfigJSON

      Generic to completely type your config.json structure.

      Use Label or one of the Content interfaces to get maximum type support. See example.

    Parameters

    Returns Promise<T>

    the computed config.json from the experience app editor.

Generated using TypeDoc