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

Updated MandatoryProjectDataType JSDoc to match current type enforcement #690

Merged
merged 1 commit into from
Dec 21, 2023
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
16 changes: 15 additions & 1 deletion lib/papi-dts/papi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,21 @@ declare module 'shared/models/project-data-provider.model' {
*/
dataQualifier: string;
};
/** All Project Data Provider data types must extend from this */
/**
* All Project Data Provider data types must have an `ExtensionData` type. We strongly recommend all
* Project Data Provider data types extend from this type in order to standardize the
* `ExtensionData` types.
*
* Benefits of following this standard:
*
* - All PSIs that support this `projectType` can use a standardized `ExtensionData` interface
* - If an extension uses the `ExtensionData` endpoint for any project, it will likely use this
* standardized interface, so using this interface on your Project Data Provider data types
* enables your PDP to support generic extension data
* - In the future, we may enforce that callers to `ExtensionData` endpoints include `extensionName`,
* so following this interface ensures your PDP will not break if such a requirement is
* implemented.
*/
export type MandatoryProjectDataType = {
ExtensionData: DataProviderDataType<ExtensionDataScope, string | undefined, string>;
};
Expand Down
16 changes: 15 additions & 1 deletion src/shared/models/project-data-provider.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,21 @@ export type ExtensionDataScope = {
dataQualifier: string;
};

/** All Project Data Provider data types must extend from this */
/**
* All Project Data Provider data types must have an `ExtensionData` type. We strongly recommend all
* Project Data Provider data types extend from this type in order to standardize the
* `ExtensionData` types.
*
* Benefits of following this standard:
*
* - All PSIs that support this `projectType` can use a standardized `ExtensionData` interface
* - If an extension uses the `ExtensionData` endpoint for any project, it will likely use this
* standardized interface, so using this interface on your Project Data Provider data types
* enables your PDP to support generic extension data
* - In the future, we may enforce that callers to `ExtensionData` endpoints include `extensionName`,
* so following this interface ensures your PDP will not break if such a requirement is
* implemented.
*/
export type MandatoryProjectDataType = {
ExtensionData: DataProviderDataType<ExtensionDataScope, string | undefined, string>;
};