Breeze / breeze.js.labs

OFFICIAL Breeze.js Labs package of extensions and utilities for Breeze.js client apps.
MIT License
43 stars 44 forks source link

The ajaxpost method declared in breeze.ajaxpost.d.ts is no longer recognized in TypeScript 5.2.2 #44

Open elezar42 opened 8 months ago

elezar42 commented 8 months ago

I just upgraded to TS 5.2.2, and my app no longer builds with an error of "Property 'ajaxpost' does not exist on type 'BreezeConfig'. I jumped from version 4.0.5 to 5.2.2, so I'm not sure exactly when it stopped working. It looks like TS no longer supports using namespace declaration merging to add a function to a variable. I was able to fix it by updating the declaration to use interface declaration merging on BreezeConfig instead:

import { AjaxAdapter, BreezeConfig } from '../breeze-client';

declare module '../breeze-client' {
    export interface BreezeConfig {
        ajaxpost(ajaxAdapter?: AjaxAdapter): void;
    }
}
steveschmitt commented 8 months ago

Thanks for pointing this out. I'll see what I can do.