hso-nn / d365-cli

Dynamics 365 Command Line Interface for TypeScript projects for Dataverse
MIT License
8 stars 1 forks source link

executeAction using generic type for return #27

Closed nsteenbeek closed 3 years ago

nsteenbeek commented 3 years ago

executeAction using generic type for return. Update wiki example as well (no unknown needed anymore)

public static async executeAction<D>(actionName: string, data?: unknown, entityLogicalName?: string, id?: string): Promise<D> {
        if (entityLogicalName) {
            return this.executeBoundAction(actionName, data, entityLogicalName, id);
        } else {
            return this.executeUnboundAction(actionName, data);
        }
    }
nsteenbeek commented 3 years ago

Fixed in version 5.10.6