Skip to content

add dynamic json typing for typescript imports#24425

Closed
mattapperson wants to merge 2 commits intoelastic:masterfrom
mattapperson:ts/json
Closed

add dynamic json typing for typescript imports#24425
mattapperson wants to merge 2 commits intoelastic:masterfrom
mattapperson:ts/json

Conversation

@mattapperson
Copy link
Contributor

This PR adds the "new" as of 2.9 resolveJsonModule tsconfig flag to Kibana. This allows the import of static JSON such as the EUI configs as typed files vs any

@mattapperson mattapperson added chore non-issue Indicates to automation that a pull request should not appear in the release notes labels Oct 23, 2018
Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (on green CI), thanks!

@sorenlouv
Copy link
Member

fyi @jasonrhodes

@elasticmachine
Copy link
Contributor

💔 Build Failed

@mattapperson
Copy link
Contributor Author

Ah there is a bug here microsoft/TypeScript#25755
This won't work until we upgrade to TS 3.1 due to us using ESNext module output.

// CC @spalger

@elasticmachine
Copy link
Contributor

💔 Build Failed

"tslint-config-prettier": "^1.15.0",
"tslint-plugin-prettier": "^2.0.0",
"typescript": "^3.0.3",
"typescript": "^3.1.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@mattapperson
Copy link
Contributor Author

Aborting PR, after further research TS added this feature, "fixed it" and now only supports commons module types due to es module spec not supporting json imports.

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

Labels

chore non-issue Indicates to automation that a pull request should not appear in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants