Skip to content

Commit b5e4910

Browse files
mark-raymonderikras
authored andcommitted
Fix up for Api -> FormApi rename, and actually expose TypeScript typings (#61)
* Api was renamed for FormApi in final-form. * Actually expose the TypeScript typings.
1 parent 8cd37e0 commit b5e4910

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"main": "dist/react-final-form.cjs.js",
77
"jsnext:main": "dist/react-final-form.es.js",
88
"module": "dist/react-final-form.es.js",
9+
"typings": "dist/index.d.ts",
910
"files": ["dist"],
1011
"scripts": {
1112
"start": "nps",

src/ReactFinalForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
version as ffVersion
99
} from 'final-form'
1010
import type {
11-
Api,
11+
FormApi,
1212
Config,
1313
FormSubscription,
1414
FormState,
@@ -35,7 +35,7 @@ export default class ReactFinalForm extends React.PureComponent<Props, State> {
3535
context: ReactContext
3636
props: Props
3737
state: State
38-
form: Api
38+
form: FormApi
3939
unsubscriptions: Unsubscribe[]
4040

4141
static childContextTypes = {

src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react'
2-
import { Api, Config, Decorator, FormState, FormSubscription, FieldSubscription } from 'final-form'
2+
import { FormApi, Config, Decorator, FormState, FormSubscription, FieldSubscription } from 'final-form'
33

44
export type ReactContext = {
5-
reactFinalForm: Api
5+
reactFinalForm: FormApi
66
}
77

88
export type FieldRenderProps = {

src/types.js.flow

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
import * as React from 'react'
33
import type {
4-
Api,
4+
FormApi,
55
Config,
66
Decorator,
77
FormState,
@@ -10,7 +10,7 @@ import type {
1010
} from 'final-form'
1111

1212
export type ReactContext = {
13-
reactFinalForm: Api
13+
reactFinalForm: FormApi
1414
}
1515

1616
export type FieldRenderProps = {

0 commit comments

Comments
 (0)