Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 7b9a7e1

Browse files
gkzfacebook-github-bot
authored andcommitted
Specify correct type of joinClasses
Summary: The type of `joinClasses` in fbjs 1.0 which draft-js open-source uses is incorrect (it is correct in www), specify the correct type when importing. I would have thought that I would have to cast the import to `any` before casting it to a different type, but apprently this works (tested in cloned github repo). Reviewed By: claudiopro Differential Revision: D14318804 fbshipit-source-id: e4fd34ca5efda6fd9be681a49905d9e9fdb9e3ae
1 parent 6183935 commit 7b9a7e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/component/contents/DraftEditorContents-core.react.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ const DraftOffsetKey = require('DraftOffsetKey');
2222
const React = require('React');
2323

2424
const cx = require('cx');
25-
const joinClasses = require('joinClasses');
25+
const joinClasses: (
26+
className?: ?string,
27+
...classes: Array<?string>
28+
) => string = require('joinClasses');
2629
const nullthrows = require('nullthrows');
2730

2831
type Props = {

0 commit comments

Comments
 (0)