Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Fix strictNullChecks incompatibility #49

Merged
merged 1 commit into from
Sep 18, 2017
Merged

Fix strictNullChecks incompatibility #49

merged 1 commit into from
Sep 18, 2017

Conversation

noelblaschke
Copy link
Contributor

@noelblaschke noelblaschke commented Sep 17, 2017

The ConnectionHeaders interface does not work with strict: true or strictNullChecks: true.

Though this point needs further investigation on TypeScript itself, this should help to have type suggestions on ConnectionHeaders in strict mode.

If this isn't consistent enough the only solution (afaik) is to remove the optional keys and the undefined key definition. In this case you will lose the type suggestion:

export interface ConnectionHeaders {
  [key: string]: string;
}

Related to: microsoft/TypeScript#17277

If you agree to these changes, dont forget to bump the version 馃

@JSteunou
Copy link
Owner

I agree to the changes because I trust you guys to maintain your own typescript stuff.

If you can enlight me on this one #47 also it would be great!

@JSteunou JSteunou merged commit 5283ff5 into JSteunou:master Sep 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants