Giter VIP home page Giter VIP logo

Comments (3)

mikefactorial avatar mikefactorial commented on May 25, 2024 2

I'm having the same issue
"@types/xrm": "9.0.18"
"xrm-mock": "3.4.16"
"typescript": "3.7.4" -- Tried going back as far as 3.5.3 with no success.

Updating the definitions to match the base types fixes it locally. Is there a recommended version of typescript and @types/xrm to use for the latest version of xrm-mock? It's likely I've missed something obvious but thought I'd share.

The specific issues are:

  1. In gridcontrol.mock.d.ts - handler should be typed as Xrm.Events.ContextSensitiveHandler
    a. Currently typed as handler: () => void
  2. In executeresponse.mock.d.ts
    a. Current Definition for ExecuteResponseMock
    body: string;
    headers: any;
    ok: boolean;
    status: number;
    statusText: string;
    type: string;
    url: string;
    constructor(components: IExecuteResponseComponents);

b. Members Required to Implement Xrm.ExecuteResponse (and Response / Body base classes)

    body: ReadableStream<Uint8Array>;
    headers: Headers;
    ok: boolean;
    redirected: boolean;
    status: number;
    statusText: string;
    type: ResponseType;
    url: string;
    trailer: Promise<Headers>;
    clone(): Response;

    bodyUsed: boolean;
    arrayBuffer(): Promise<ArrayBuffer>;
    blob(): Promise<Blob>;
    formData(): Promise<FormData>;
    json(): Promise<any>;
    text(): Promise<string>;
    constructor(components: IExecuteResponseComponents);

from xrm-mock.

camelCaseDave avatar camelCaseDave commented on May 25, 2024 1

@mikefactorial good work. #49 includes the code you provided. I'll publish the new xrm-mock v3.4.17 now.

from xrm-mock.

mikefactorial avatar mikefactorial commented on May 25, 2024

Pulled the latest and everything works great. Thank you @camelCaseDave for a great framework!

from xrm-mock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.