-
Notifications
You must be signed in to change notification settings - Fork 120
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 #207 from Sitebase/bug/types
[typescript] fix broken typescript definitions
- Loading branch information
Showing
5 changed files
with
79 additions
and
17 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,61 @@ | ||
/** | ||
* This file contains a very small demo project | ||
* that is tested for type correctness in the | ||
* `npm run test:type-check` check. | ||
* | ||
* This file is intended to include any API interface | ||
* to ensure that our type definitions are correct. | ||
*/ | ||
|
||
import React, { Component } from 'react'; | ||
import Avatar, { | ||
createAvatarComponent, | ||
ConfigProvider, | ||
Cache, | ||
|
||
GravatarSource, | ||
FacebookSource, | ||
GithubSource, | ||
SkypeSource, | ||
ValueSource, | ||
SrcSource, | ||
IconSource, | ||
|
||
VKontakteSource, | ||
InstagramSource, | ||
TwitterSource, | ||
GoogleSource, | ||
} from '..'; | ||
|
||
const CustomAvatar = createAvatarComponent({ | ||
sources: [ | ||
GravatarSource, | ||
FacebookSource, | ||
GithubSource, | ||
SkypeSource, | ||
ValueSource, | ||
SrcSource, | ||
IconSource, | ||
VKontakteSource, | ||
InstagramSource, | ||
TwitterSource, | ||
GoogleSource, | ||
] | ||
}); | ||
|
||
export default | ||
class TypeTest extends Component { | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Avatar /> | ||
<CustomAvatar /> | ||
|
||
<ConfigProvider> | ||
<Avatar /> | ||
</ConfigProvider> | ||
</div> | ||
) | ||
} | ||
} |
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
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,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonjs", | ||
"jsx": "react", | ||
"noEmit": true, | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.