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

Typescript errors while compiling #4035

Closed
eckstaedt opened this issue Jan 29, 2018 · 5 comments
Closed

Typescript errors while compiling #4035

eckstaedt opened this issue Jan 29, 2018 · 5 comments

Comments

@eckstaedt
Copy link

eckstaedt commented Jan 29, 2018

fulcalendar.d.ts version 3.8.1:
TS (2.6.2) compiler with strict null checking set is giving me errors because of wrong indexer type in this interface:

Line 1428:

    export interface ButtonTextCompoundInput {
	    prev?: any;
	    next?: any;
	    prevYear?: any;
	    nextYear?: any;
	    today?: any;
	    month?: any;
	    week?: any;
	    day?: any;
	    [viewId: string]: string;
    }
Property 'prev' of type 'string | undefined' is not assignable to string index type 'string'.

The same error for all other properties of this interface.

@acerix
Copy link
Member

acerix commented Jan 29, 2018

I don't have any error with compilation, is it when you run gulp dist as described here?

https://github.com/fullcalendar/fullcalendar/blob/master/CONTRIBUTING.md#development-workflow

@eckstaedt
Copy link
Author

No I simply start my application with npm.
Using Webpack 3 and awesome-typescript-loader.

@arshaw
Copy link
Member

arshaw commented Jan 30, 2018

this is the same problem reported in #3889 (comment)

has to do with strictNullChecks being turned on.

i have this fixed in master and will release soon

@eckstaedt
Copy link
Author

eckstaedt commented Jan 30, 2018

sorry the code snippet was already with the modified types for testing. This is the right one.

export interface ButtonTextCompoundInput {
    prev?: string;
    next?: string;
    prevYear?: string;
    nextYear?: string;
    today?: string;
    month?: string;
    week?: string;
    day?: string;
    [viewId: string]: string;
}

Hope this was not confusing...

@arshaw
Copy link
Member

arshaw commented Jan 31, 2018

fixed in v3.8.2

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

No branches or pull requests

3 participants