Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: change the type of additionalProperties in TemplateConfig to 'Record<string, any>' #527

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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&lt;string, any&gt; | _(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
Loading