I am defining a custom type as follows:
/**
* function to create external storage storage vendor CR or resources.
* @export
* @callback CreatePayloadFunction
* @param {string} storageClass
* The name of the of the storage class required for creation of storage class resource.
*
* @param {string} systemName
* The name of the external storage system requried for the creation of the external custom resource.
*
* @param {Object} form
* The other fields of the create storage class form.
*
* @param {Object} model
* The model referring the `apiGroup`,`apiVersion` and `kind` of the external storage provider's CRD.
*
* @returns {{ model: ExtensionK8sModel; payload: K8sResourceKind }[]}}
*/
In the same file I am using this as follows:
export type ExternalStorage = {
/** Display name of the external storage vendor. */
displayName: string;
/** The model referring the `apiGroup`,`apiVersion` and `kind` of the external storage provider's CRD. */
model: ExtensionK8sModel;
/** @type {CreatePayloadFunction} */
createPayload: CreatePayload;
};
When I am exporting the object as:
export const SUPPORTED_EXTERNAL_STORAGE: ExternalStorage[] = [
{
displayName: 'Red Hat Ceph Storage',
model: {
group: OCSServiceModel.apiGroup,
version: OCSServiceModel.apiVersion,
kind: OCSServiceModel.kind,
},
Component: null,
createPayload: null,
},
I am seeing that vscode only analyzing the object as {CreatePayloadFunction}
How shall I make vscode to identify the types ?
