-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Typescript webpack setup #1446
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 webpack setup #1446
Changes from 3 commits
88ee167
09f46da
b223363
88399f8
d7133fa
9de7a44
586f083
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| require("@babel/register")({ extensions: ['.js', '.jsx', '.ts', '.tsx'] }); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,12 @@ import { | |
| } from "../utils"; | ||
| import validateFormData, { toErrorList } from "../validate"; | ||
|
|
||
| export default class Form extends Component { | ||
| interface IFormProps { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has there been any discussion to export typings with the build or will you maintain typings within @types/react-jsonschema-form? To add onto that, has there been any discussion regarding naming conventions for types?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not yet. It would be great to start one! What would be the advantages/disadvantages of exporting typings with the build vs maintaining typings within @types/react-jsonschema-form? Do other libraries based in typescript typically do the former?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
A big drawback with using DefinitelyTyped is that it's community maintained and can sometimes get out of sync with the actual library. That repository is mainly for JS packages that don't have typings for TS projects. And sometimes DefinitelyTyped can take a while to merge PR's so you'd have to wait for a release before you could use new typings. With that in mind, it's usually better to export typings with the package so your types are always 1:1 and you don't have to maintain two separate packages.
Usually yeah. Check out nestjs or even vscode. Go explore some more TS packages here in GH |
||
| [x: string]: any, | ||
| formElement: any | ||
| } | ||
|
|
||
| export default class Form extends Component<IFormProps, any> { | ||
| static defaultProps = { | ||
| uiSchema: {}, | ||
| noValidate: false, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.