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

Update ExchangeWebService.d.ts #405

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kavin71725
Copy link

A temporary fix for initializing a Recurrence.XXXPattern() with arguments (overload not compatible)
Using Recurrence.XXXPattern() it’s no argument first and set properties later also failed because some properties are read-only.
If directly used new XXXPattern(), it indicates that XXXPattern is not a constructor.

Any other ways to fix it would also be appropriated.

A temporary fix for initializing a Recurrence.XXXPattern() with arguments (overload not compatible)
Using Recurrence.XXXPattern() it’s no argument first and set properties later also failed because some properties are read-only.
If directly used new XXXPattern(), it indicates that XXXPattern is not a constructor.

Any other ways to fix it would also be appropriated.
@gautamsi
Copy link
Owner

gautamsi commented Aug 7, 2022

provide code sample which gives you trouble here.

I have no problem using this

import {DailyPattern, DateTime} from 'ews-javascript-api';
const recurrence = new DailyPattern(DateTime.Now, 121)

@kavin71725
Copy link
Author

kavin71725 commented Aug 8, 2022

exactly the same as you did
but got

TypeError: ews_javascript_api_1.DailyPattern is not a constructor

or
const recurrence = new Recurrence.WeeklyPattern(DateTime.Now, 1, [DayIfTheWeek.Saturday])

got error TS2554: Expected 0 arguments, but got 3.

I guess it's compilation problem?
My tsconfig.json:

target: es2017
module: commonjs
strict : true
esModuleInterop: true
experimentalDecorators: true
emitDeoratorMetadata: true
allowWyntheticDefaultImports: true
noIimplicitAny: false
useUnknowInCatchVariables: false

@bladerunner2020
Copy link

provide code sample which gives you trouble here.

I have no problem using this

import {DailyPattern, DateTime} from 'ews-javascript-api';
const recurrence = new DailyPattern(DateTime.Now, 121)

I got an error with this - DailyPattern is not a contractor.
new Recurrence.DailyPattern(startDate.Date, 1); - this works, but requires // @ts-ignore.

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

Successfully merging this pull request may close these issues.

None yet

3 participants