Skip to content

Commit

Permalink
refactor: change the type of additionalProperties in TemplateConfig t…
Browse files Browse the repository at this point in the history
…o 'Record<string, any>'
  • Loading branch information
ehallerYext committed Jul 22, 2024
1 parent 9ba356b commit 65a7e9f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The field to pass additional metadata
**Signature:**

```typescript
additionalProperties?: string;
additionalProperties?: Record<string, any>;
```
2 changes: 1 addition & 1 deletion packages/pages/docs/api/pages.templateconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface TemplateConfig

| Property | Modifiers | Type | Description |
| ----------------------------------------------------------------------------- | --------- | --------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [additionalProperties?](./pages.templateconfig.additionalproperties.md) | | string | _(Optional)_ The field to pass additional metadata |
| [additionalProperties?](./pages.templateconfig.additionalproperties.md) | | Record<string, any> | _(Optional)_ The field to pass additional metadata |
| [alternateLanguageFields?](./pages.templateconfig.alternatelanguagefields.md) | | string\[\] | _(Optional)_ The specific fields to add additional language options to based on the stream's localization |
| [hydrate?](./pages.templateconfig.hydrate.md) | | boolean | _(Optional)_ Determines if hydration is allowed or not for webpages |
| [name?](./pages.templateconfig.name.md) | | string | _(Optional)_ The name of the template feature. If not defined uses the template filename (without extension) |
Expand Down
2 changes: 1 addition & 1 deletion packages/pages/etc/pages.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export type Template<T extends TemplateRenderProps> = (

// @public
export interface TemplateConfig {
additionalProperties?: string;
additionalProperties?: Record<string, any>;
alternateLanguageFields?: string[];
hydrate?: boolean;
name?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/pages/src/common/src/feature/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface FeatureConfigBase {
/** @deprecated field will be unsupported in the future */
alternateLanguageFields?: string[];
onUrlChange?: PluginFunctionSelector;
additionalProperties?: string;
additionalProperties?: Record<string, any>;
}

interface EntityPageSetConfig extends FeatureConfigBase {
Expand Down
2 changes: 1 addition & 1 deletion packages/pages/src/common/src/template/internal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface TemplateConfigInternal {
/** The field to use as the slug for dynamic dev mode */
slugField?: string;
/** The field to pass additional metadata */
additionalProperties?: string;
additionalProperties?: Record<string, any>;
/** The type of template */
templateType: "entity" | "static";
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pages/src/common/src/template/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface TemplateConfig {
/** The field to use as the slug for dynamic dev mode */
slugField?: string;
/** The field to pass additional metadata */
additionalProperties?: string;
additionalProperties?: Record<string, any>;
}

/**
Expand Down

0 comments on commit 65a7e9f

Please sign in to comment.