Skip to content

Commit 83c9120

Browse files
clydinalan-agius4
authored andcommitted
fix(@angular-devkit/core): allow prompt providers to access property types
This allows prompt providers to adjust their logic based on the type of property requested.
1 parent 4737301 commit 83c9120

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

etc/api/angular_devkit/core/src/_golden-api.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ export interface PromptDefinition {
715715
}>;
716716
message: string;
717717
multiselect?: boolean;
718+
propertyTypes: Set<string>;
718719
raw?: string | JsonObject;
719720
type: string;
720721
validator?: (value: JsonValue) => boolean | string | Promise<boolean | string>;

packages/angular_devkit/core/src/json/schema/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export interface PromptDefinition {
105105

106106
raw?: string | JsonObject;
107107
multiselect?: boolean;
108+
propertyTypes: Set<string>;
108109
}
109110

110111
export type PromptProvider = (definitions: Array<PromptDefinition>)

packages/angular_devkit/core/src/json/schema/registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ export class CoreSchemaRegistry implements SchemaRegistry {
590590
raw: schema,
591591
items,
592592
multiselect,
593+
propertyTypes,
593594
default:
594595
typeof (parentSchema as JsonObject).default == 'object' &&
595596
(parentSchema as JsonObject).default !== null &&

0 commit comments

Comments
 (0)