search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

daypilot-lite-angular-5.4.1 | Missing namespace implementation Http

Asked by Anonymous
1 month ago.

Hi,
latest implementation of 5.4.1 has removed namespace implementation of Http from:
node_modules/@daypilot/daypilot-lite-angular/lib/core/daypilot-core.d.ts


//from /node_modules/@daypilot/daypilot-lite-angular/lib/core/daypilot-core.d.ts
namespace Http { }



npm dev environment provides error:
….

TS2694: Namespace 'Http' has no exported member 'Result'
node_modules/@daypilot/daypilot-lite-angular/lib/core/daypilot-core.d.ts:1246:84:
1246 │ ...: string, params?: Http.RequestParams): Promise<Http.Result<T>>;
~~~~~~
….

Compared to Javascript:

//from /node_modules/@daypilot/daypilot-lite-javascript/daypilot-javascript.min.d.ts

namespace Http {
interface RequestParams { contentType?: string; headers?: Record<string, string>; }
interface Result<T = any> { request: XMLHttpRequest; data?: T; }
}




Fix
: adding Http namespace contents to /node_modules/@daypilot/daypilot-lite-angular/lib/core/daypilot-core.d.ts fixed issue.

ADD into namespace Http:
interface RequestParams { contentType?: string; headers?: Record<string, string>; }
interface Result<T = any> { request: XMLHttpRequest; data?: T; }



Answer posted by Dan Letecky [DayPilot]
1 month ago.

In the latest release, these interfaces were not marked as exported and they got stripped out of the Angular package during build time. It should be fixed now in the latest sandbox build. The fix will be included in the next release.

Thank you for reporting the issue.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.