Adds support for empty
type - #213
We now support and depend on babel 7 - [#211]
Version 24.1.2 is the latest version for users of babel 6.
Fixes deadCode for babel 7 #154-c1
Fixes spread of imported type #205
Supports $ReadOnlyArray
#203
Fixes rare error with propTypes spread #199
Handle explicit proptypes and default props #196
opaque types are now supported, and are treated the same as other types, even outside of the file they're defined in.
export opaque type Foo = string;
Support class components with intersection type annotations
type Props = { x: string };
class C extends React.Component<Props & { y: string }>{}
Adds support for the following:
import type {Node} from 'react';
import {type Node} from 'react':
Supports class syntax with no name
. Minor version because it previously gave an error.
export const MyComponent = class extends React.Component<Props> {
Adds support for re-exporting types - #190
import type { X } from './X';
export type { X };
If you try to rename the exports, it'll skip them currently (please contribute!).
These previously gave errors:
type Props = {
x: { [k: string]: number, x: string },
y: { [k: string]: number, [l: string]: number },
}
They now fail soft.
Stops trying to import types from things that look like node_modules (e.g. from 'foo'
). #186. File an issue if this negatively affects you, and we can consider making it configurable.
Supports mappings like {[key: string]: number}
using PropTypes.objectOf
.
The value inside array types (e.g. Array<string>
or string[]
) cannot be
null, unless they're marked with ?
.
Babel 7 compatibility fixes.
Adds basic support for interface types.
export interface Pager {
next(number): void,
prev(number): void,
hasNext: boolean,
hasPrev: boolean,
}
Adds support for:
export type { Foo } from './types';
Fixes bug with two named type imports from one module. #172
Switches to ES6 modules for import/export by default.
Switches to useStatic
by default
class C extends Component { static propTypes = {} }
- Fix issue 96 type annotations with member expressions #98
- Fix error on attempted propTypes generation for non-component function (#66)
- Fix bug with functions defaulting to react components (#97)
- Add support for top-level propTypes assignment of imported types (#88)
- Add support for instanceOf (see PR #6, #92)
- Fix isRequired for imported types (if they are not functions)
- Fix #75: intersection not supported
- Fix #71: propTypes are not created if you assign props from a pre-defined type or if you import types from another file
- Testcase for #1, known working
- Testcase for #19, known working
- Merge pull request #83 from mehcode/ignore-opt
- Enforce linting (#82)
- Update remaining react PropTypes (#81)
- Suppress transform of any file in node_modules (#79)
- allow imports from non-local packages, #62
- Fix typo in readme "onw_of_type" -> "one_of_type" (#77)
- Fix hoc (#76)
- handles intersection types, #75
- uses prop-types package, fixes #72
- supports existential types, fixes #68
- ensure 'exports' is defined before setting type exports, fixes #65
- ignore imports from non-relative paths, fixes #62
- Properly handle exporting named types (#60)
- Added dependency status repo badge (#59)
- Use package.json files field (#58)
- supports () : ReactElement =>, fixes #55
- traverse function contents looking for jsx, fixes #54
- add support for exact types (#51)
- adds suppression directive, #9
- Add support for
mixed
(#46)
- handles GenericTypeAnnotation in getPropsForTypeAnnotation, fixes #42
- Fixed crash when props are annotated as Object (#41)
- use any for IntersectionTypeAnnotation, fixes #40
- Merge pull request #39 from laat/stateless-arrow-body
- Merge pull request #38 from skovhus/export-declartion-fix
- Merge pull request #37 from skovhus/props-inline-in-class
- Reuse typeannotation logic to fix bug with inline props (solves #35)
- Merge pull request #36 from skovhus/travis-integration
- Merge pull request #34 from skovhus/TupleTypeAnnotation
- Merge pull request #33 from skovhus/support-union-with-null
- Merge pull request #32 from skovhus/bug-fixes
- Merge pull request #31 from skovhus/functional-components
- Stop relying on type definition name ending with Props (solves #9)
- Merge pull request #30 from skovhus/eslint
- Merge pull request #27 from SomeHats/master
- handles TypeofTypeAnnotation, fixes #25
- handles StringLiteralTypeAnnotation and similar, fixes #24
- handles ImportDefaultSpecifier, fixes #23
- defaults import to PropTypes.any if it doesn't exist, #2
- adds hacking.md, resolves #20
- support string[], etc. fixes #17
- fixes insertAfter with named exports and top level class declarations, fixes #16
- fixes export type top level shape to use require('react'), #14
- use require('react') instead of React, fixes #14
- supports NullableTypeAnnotation, fixes #15
- Merge pull request #10 from STRML/cleanup
- Merge pull request #8 from STRML/void
- fixes handling of ExportNamedDeclaration for non-TypeAlias, fixes #7