Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elezar42 opened this issue Jan 17, 2024 · 1 comment

Comments

@elezar42
Copy link

elezar42 commented Jan 17, 2024

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants