-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from bamlab/typescript
feat(typescript): Export type for typescript
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,60 @@ | ||
import * as React from 'react'; | ||
|
||
export interface makeReactNativeFieldProps { | ||
name: string; | ||
} | ||
|
||
export interface withInputTypePropsProps { | ||
type: string; | ||
} | ||
|
||
export interface withErrorProps { | ||
name: string; | ||
} | ||
|
||
export interface withTouchedProps { | ||
name: string; | ||
} | ||
|
||
export type makeInputGreatAgainProps = makeReactNativeFieldProps & | ||
withInputTypePropsProps & | ||
withErrorProps & | ||
withTouchedProps; | ||
|
||
export function makeReactNativeField<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props & makeReactNativeFieldProps>; | ||
|
||
export function withError<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props & withErrorProps>; | ||
|
||
export function withInputTypeProps<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props & withInputTypePropsProps>; | ||
|
||
export function withFormik<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props>; | ||
|
||
export function withNextInputAutoFocusInput<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props>; | ||
|
||
export function withNextInputAutoFocusForm<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props>; | ||
|
||
export function withPickerValues<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props>; | ||
|
||
export function withTouched<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props & withTouchedProps>; | ||
|
||
export function makeInputGreatAgain<Props>( | ||
WrappedComponent: React.ComponentType<Props> | ||
): React.ComponentClass<Props & makeInputGreatAgainProps>; | ||
|
||
export default makeInputGreatAgain; |
This file contains 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 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 |
---|---|---|
|
@@ -118,6 +118,12 @@ | |
version "9.4.7" | ||
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.7.tgz#57d81cd98719df2c9de118f2d5f3b1120dcd7275" | ||
|
||
"@types/react@^16.3.8": | ||
version "16.3.8" | ||
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.3.8.tgz#40c7e4eca3f48783e4c4ccee26fc7f5a5a476d84" | ||
dependencies: | ||
csstype "^2.0.0" | ||
|
||
JSONStream@^1.0.4: | ||
version "1.3.2" | ||
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" | ||
|
@@ -1888,6 +1894,10 @@ [email protected], "cssom@>= 0.3.2 < 0.4.0": | |
dependencies: | ||
cssom "0.3.x" | ||
|
||
csstype@^2.0.0: | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.2.0.tgz#1656ef97553ac53b77090844a2531c6660ebd902" | ||
|
||
csurf@~1.8.3: | ||
version "1.8.3" | ||
resolved "https://registry.yarnpkg.com/csurf/-/csurf-1.8.3.tgz#23f2a13bf1d8fce1d0c996588394442cba86a56a" | ||
|