Skip to content

Commit

Permalink
#1270: improve typing
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jun 6, 2024
1 parent 2cebec1 commit cc1d882
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions @types/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,11 @@ declare class Mcdev {
*
* @param {string} businessUnit name of BU
* @param {TypeKeyCombo} selectedTypesArr limit retrieval to given metadata type
* @param {string} to what to replace with
* @param {string[]} [fromList] what to replace
* @param {ContentBlockConversionTypes} to what to replace with
* @param {ContentBlockConversionTypes[]} [fromList] what to replace
* @returns {Promise.<Object.<string, object>>} key1: business unit name, key2:type value: list of fixed item keys
*/
static replaceCbReference(businessUnit: string, selectedTypesArr: TypeKeyCombo, to: string, fromList?: string[]): Promise<{
static replaceCbReference(businessUnit: string, selectedTypesArr: TypeKeyCombo, to: ContentBlockConversionTypes, fromList?: ContentBlockConversionTypes[]): Promise<{
[x: string]: object;
}>;
/**
Expand Down
2 changes: 1 addition & 1 deletion @types/lib/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion @types/lib/util/util.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ export namespace Util {
* @param {boolean} [returnEmpty] returns array with null element if false/not set; Retriever needs this to be false; Deployer needs it to be true
* @returns {TypeKeyCombo} -
*/
function createTypeKeyCombo(typeArr: string[], keyArr: string[], returnEmpty?: boolean): any;
function createTypeKeyCombo(typeArr: string[], keyArr: string[], returnEmpty?: boolean): {
[x: string]: string[];
};
/**
* async version of Array.find()
* returns the first element in the provided array that satisfies the provided testin function
Expand Down
2 changes: 1 addition & 1 deletion @types/lib/util/util.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions @types/types/mcdev.d.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ export type TemplateMap = {
};
export type SupportedMetadataTypes = 'asset' | 'asset-archive' | 'asset-asset' | 'asset-audio' | 'asset-block' | 'asset-code' | 'asset-document' | 'asset-image' | 'asset-message' | 'asset-other' | 'asset-rawimage' | 'asset-template' | 'asset-textfile' | 'asset-video' | 'attributeGroup' | 'attributeSet' | 'automation' | 'campaign' | 'contentArea' | 'dataExtension' | 'dataExtensionField' | 'dataExtensionTemplate' | 'dataExtract' | 'dataExtractType' | 'discovery' | 'deliveryProfile' | 'email' | 'emailSend' | 'event' | 'fileLocation' | 'fileTransfer' | 'filter' | 'folder' | 'importFile' | 'journey' | 'list' | 'mobileCode' | 'mobileKeyword' | 'mobileMessage' | 'query' | 'role' | 'script' | 'sendClassification' | 'senderProfile' | 'transactionalEmail' | 'transactionalPush' | 'transactionalSMS' | 'triggeredSend' | 'user' | 'verification';
/**
* object-key=metadata type, value=array of external keys
* object-key=SupportedMetadataTypes, value=array of external keys
*/
export type TypeKeyCombo = any;
export type TypeKeyCombo = {
[x: string]: string[] | null;
};
/**
* generic metadata item
*/
Expand Down
Loading

0 comments on commit cc1d882

Please sign in to comment.