-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
03c170b
commit c445879
Showing
17 changed files
with
108 additions
and
22 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
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
4 changes: 2 additions & 2 deletions
4
source/test/fixtures/lib-config/failure-missing-lib/index.d.ts
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
declare const document: Document; | ||
declare const window: Window; | ||
|
||
export default document; | ||
export default window; |
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 |
---|---|---|
@@ -1 +1 @@ | ||
module.exports.default = window.document; | ||
module.exports.default = window; |
4 changes: 2 additions & 2 deletions
4
source/test/fixtures/lib-config/failure-missing-lib/index.test-d.ts
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {expectType} from '../../../..'; | ||
import document from '.'; | ||
import window from '.'; | ||
|
||
expectType<Document>(document); | ||
expectType<Window>(window); |
4 changes: 2 additions & 2 deletions
4
source/test/fixtures/lib-config/lib-as-triple-slash-reference/index.d.ts
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// <reference lib="dom"/> | ||
|
||
declare const document: Document; | ||
declare const window: Window; | ||
|
||
export default document; | ||
export default window; |
2 changes: 1 addition & 1 deletion
2
source/test/fixtures/lib-config/lib-as-triple-slash-reference/index.js
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 |
---|---|---|
@@ -1 +1 @@ | ||
module.exports.default = window.document; | ||
module.exports.default = window; |
4 changes: 2 additions & 2 deletions
4
source/test/fixtures/lib-config/lib-as-triple-slash-reference/index.test-d.ts
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {expectType} from '../../../..'; | ||
import document from '.'; | ||
import window from '.'; | ||
|
||
expectType<Document>(document); | ||
expectType<Window>(window); |
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,7 @@ | ||
import {Component} from 'react'; | ||
|
||
interface UnicornProps { | ||
rainbow: string; | ||
} | ||
|
||
export class Unicorn extends Component<UnicornProps> {} |
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,12 @@ | ||
'use strict'; | ||
const React = require('react'); | ||
|
||
export class Unicorn extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
return <h1>{this.props.rainbow}</h1>; | ||
} | ||
} |
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,10 @@ | ||
{ | ||
"name": "foo", | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"dependencies": { | ||
"react": "*" | ||
} | ||
} |
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,7 @@ | ||
import * as React from 'react'; | ||
import {expectType, expectError} from '../../../../..'; | ||
import {Unicorn} from '..'; | ||
|
||
expectType<JSX.Element>(<Unicorn rainbow='🌈' />); | ||
|
||
expectError(<Unicorn foo='bar' />); |
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,7 @@ | ||
import {Component} from 'react'; | ||
|
||
interface UnicornProps { | ||
rainbow: string; | ||
} | ||
|
||
export class Unicorn extends Component<UnicornProps> {} |
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,12 @@ | ||
'use strict'; | ||
const React = require('react'); | ||
|
||
export class Unicorn extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
return <h1>{this.props.rainbow}</h1>; | ||
} | ||
} |
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,7 @@ | ||
import * as React from 'react'; | ||
import {expectType, expectError} from '../../..'; | ||
import {Unicorn} from '.'; | ||
|
||
expectType<JSX.Element>(<Unicorn rainbow='🌈' />); | ||
|
||
expectError(<Unicorn foo='bar' />); |
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,10 @@ | ||
{ | ||
"name": "foo", | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"dependencies": { | ||
"react": "*" | ||
} | ||
} |
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