Skip to content

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

@elezar42

Description

@elezar42

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;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions