getFrontendData | WebHare Platform SDKWebHare Platform SDKPreparing search index...@webhare/frontendgetFrontendDataFunction getFrontendDataGet data exported by the response Type Param: TypeThe type of data to get Param: dataObjectThe data object of data to get Param: allowMissingIf true, return null if the data object is missing. Otherwise throw an error Example declare module "@webhare/frontend" { interface FrontendDataTypes { "mymodule:type": { test: number; }; } } const data = getFrontendData("mymodule:type"); Copy getFrontendData<Type extends keyof FrontendDataTypes>( type: Type, options: { allowMissing: true },): null | FrontendDataTypes[Type]Type ParametersType extends keyof FrontendDataTypesParameterstype: Typeoptions: { allowMissing: true }Returns null | FrontendDataTypes[Type]getFrontendData<Type extends keyof FrontendDataTypes>( type: Type, options?: { allowMissing: boolean },): FrontendDataTypes[Type]Type ParametersType extends keyof FrontendDataTypesParameterstype: TypeOptionaloptions: { allowMissing: boolean }Returns FrontendDataTypes[Type]SettingsMember VisibilityProtectedInheritedThemeOSLightDarkWebHare Platform SDKLoading...
Get data exported by the response
Type Param: Type
The type of data to get
Param: dataObject
The data object of data to get
Param: allowMissing
If true, return null if the data object is missing. Otherwise throw an error
Example