-
Notifications
You must be signed in to change notification settings - Fork 886
Introduce TypeScript support into the dev & build systems #1317
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
Merged
chandlerprall
merged 64 commits into
elastic:master
from
chandlerprall:feature/typescript
Nov 30, 2018
Merged
Changes from 61 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
b8a1600
initial setup for TS in codebase
chandlerprall 146f5a4
Running TypeScript in jest tests
chandlerprall 5587db5
use ts-jest 23.1.4 for json5 babelrc support
chandlerprall 5070e43
include typescript sources and declarations in output to lib
chandlerprall aa7df95
ts defs to proptypes
chandlerprall e22bc4a
ts-to-proptype conversion interacting with react-docgen
chandlerprall 3a1f96b
Convert Array<> types to prop types
chandlerprall f1091be
Refactor how required/optional types are passed
chandlerprall a74601c
Array tests, understand object/shape types
chandlerprall 993fd77
Fixed bug in Array type support, added full support for union types
chandlerprall 1827d91
Understands intersections, unknown types resolve to PropTypes.any
chandlerprall 9e4465f
Correctly resolving typescript type imports through files
chandlerprall 2ca8b35
Support typescript conversion to element and node prop types
chandlerprall 4a59927
Clean up some bugs
chandlerprall 1014e39
compile type declarations into types/ directory
chandlerprall 752404f
iteration
chandlerprall 0d30a28
iteration
chandlerprall f946ebd
property merging generated and written defs
chandlerprall 85bf071
Merge branch 'master' into feature/typescript
chandlerprall fd14ec6
updated yarn.lock
chandlerprall 37d916f
don't generate ts defs when linting
chandlerprall b9d6d34
Default TS typechecking to not emit files
chandlerprall 1afefec
Merge branch 'master' into feature/typescript
chandlerprall 03f67dd
clean up and fix a lot of TS issues
chandlerprall 4911617
better TS import resolving
chandlerprall 9a57a05
point types at eui.d.ts
chandlerprall f584b40
Merge branch 'master' into feature/typescript
chandlerprall aee2549
get passing tests
chandlerprall 4c014db
fixed ts issues
chandlerprall f5537b0
typescript support via babel
chandlerprall 1ff73ec
remove ts-jest
chandlerprall 0d5ec5c
progress on the babel plugin
chandlerprall bda6ab4
majority of babel ts->proptype plugin functioning
chandlerprall 6d70023
typescript defs to proptype babel plugin passing all test
chandlerprall f4a867d
babel plugin for ts->proptypes is working
chandlerprall d883a41
Merge branch 'master' into feature/typescript
chandlerprall 6972bce
small cleanup
chandlerprall a91cc24
small cleanup
chandlerprall 8b4203b
Merge branch 'master' into feature/typescript
chandlerprall f0adf02
fix test runner
chandlerprall b48e4fa
update spacer test file to tsx
chandlerprall 83d94f1
typescript -> proptypes now understands shorthand array type syntax
chandlerprall 7715509
clean up ts->proptypes script
chandlerprall 22667f5
convert spacer example doc to tsx
chandlerprall 5d65a2d
ts build cleanup
chandlerprall 7945d78
Merge branch 'master' into feature/typescript
chandlerprall ec62844
don't need to ignore the types dir 3 times
chandlerprall 2e67e5f
dtsgenerator is not a distributed dependency
chandlerprall 8af0911
validate typescript code during build
chandlerprall 9c313ec
small cleanup
chandlerprall 1eed3cb
support ts enums in proptype generation
chandlerprall a0a35d7
PR feedback
chandlerprall c8f6eb2
Added more comments to the typescript->proptype babel plugin; fixed b…
chandlerprall dcd95ad
Add support for 'keyof typeof [object expression]'
chandlerprall c939146
horizontal rule conversion to ts
snide 1ccff65
Update src/components/horizontal_rule/horizontal_rule.tsx
chandlerprall 1f848de
feedback
snide fa50bc5
feedback
snide c04bd73
Updated yeoman templates for typescript
chandlerprall f4b81b5
Update docs code gen to point at @elastic/eui more often
chandlerprall d92fb51
Update yeoman generator for docs
chandlerprall 63c1d53
don't require 'public' keyword on public class methods
chandlerprall 1a1b88a
Merge branch 'master' into feature/typescript
chandlerprall b2085ca
changelog
chandlerprall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
...ator-eui/component/templates/component.js → ...tor-eui/component/templates/component.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import React, { HTMLAttributes, SFC } from 'react'; | ||
| import { CommonProps } from '../common'; | ||
| import classNames from 'classnames'; | ||
|
|
||
| export type <%= componentName %>Props = HTMLAttributes<HTMLDivElement> & CommonProps & { | ||
|
|
||
| }; | ||
|
|
||
| export const <%= componentName %>: React.SFC<<%= componentName %>Props> = ({ | ||
| children, | ||
| className, | ||
| ...rest | ||
| }) => { | ||
| const classes = classNames('<%= cssClassName %>', className); | ||
|
|
||
| return ( | ||
| <div | ||
| className={classes} | ||
| {...rest} | ||
| > | ||
| {children} | ||
| </div> | ||
| ); | ||
| }; |
2 changes: 1 addition & 1 deletion
2
generator-eui/component/templates/test.js → generator-eui/component/templates/test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.