2016-12-23 22:31:38 +03:00
|
|
|
exports[`test A.js 1`] = `
|
|
|
|
"/* @providesModule A */
|
|
|
|
class Implementation {}
|
|
|
|
export function foo(): Implementation { return new Implementation; }
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
/* @providesModule A */
|
|
|
|
class Implementation {}
|
|
|
|
export function foo(): Implementation {
|
2017-01-11 02:51:46 +03:00
|
|
|
return new Implementation();
|
2017-01-11 18:16:38 +03:00
|
|
|
}
|
|
|
|
"
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`test ExplicitProvidesModuleDifferentName.js 1`] = `
|
|
|
|
"/*
|
|
|
|
* @providesModule ExplicitProvidesModuleDifferentName
|
|
|
|
* @flow
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Implementation {}
|
|
|
|
module.exports.fun = (): Implementation => new Implementation;
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
/*
|
|
|
|
* @providesModule ExplicitProvidesModuleDifferentName
|
|
|
|
* @flow
|
|
|
|
*/
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2016-12-23 22:31:38 +03:00
|
|
|
class Implementation {}
|
2017-01-11 18:16:38 +03:00
|
|
|
module.exports.fun = (): Implementation => new Implementation();
|
|
|
|
"
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`test ExplicitProvidesModuleSameName.js 1`] = `
|
|
|
|
"/*
|
|
|
|
* @providesModule ExplicitProvidesModuleSameName
|
|
|
|
* @flow
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Implementation {}
|
|
|
|
module.exports.fun = (): Implementation => new Implementation;
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
/*
|
|
|
|
* @providesModule ExplicitProvidesModuleSameName
|
|
|
|
* @flow
|
|
|
|
*/
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2016-12-23 22:31:38 +03:00
|
|
|
class Implementation {}
|
2017-01-11 18:16:38 +03:00
|
|
|
module.exports.fun = (): Implementation => new Implementation();
|
|
|
|
"
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`test ImplicitProvidesModule.js 1`] = `
|
|
|
|
"/*
|
|
|
|
* @providesModule ImplicitProvidesModule
|
|
|
|
* @flow
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Implementation {}
|
|
|
|
module.exports.fun = (): Implementation => new Implementation;
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
/*
|
|
|
|
* @providesModule ImplicitProvidesModule
|
|
|
|
* @flow
|
|
|
|
*/
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2016-12-23 22:31:38 +03:00
|
|
|
class Implementation {}
|
2017-01-11 18:16:38 +03:00
|
|
|
module.exports.fun = (): Implementation => new Implementation();
|
|
|
|
"
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`test md5.js 1`] = `
|
|
|
|
"/* @providesModule md5 */
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2017-01-11 18:16:38 +03:00
|
|
|
|
2016-12-23 22:31:38 +03:00
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`test test.js 1`] = `
|
|
|
|
"/* @flow */
|
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var Implicit = require(\'ImplicitProvidesModule\');
|
2016-12-23 22:31:38 +03:00
|
|
|
(Implicit.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var ExplicitSameName = require(\'ExplicitProvidesModuleSameName\');
|
2016-12-23 22:31:38 +03:00
|
|
|
(ExplicitSameName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var ExplicitDifferentName = require(\'ExplicitProvidesModuleDifferentName\');
|
2016-12-23 22:31:38 +03:00
|
|
|
(ExplicitDifferentName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
/* @flow */
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var Implicit = require(\"ImplicitProvidesModule\");
|
2017-01-26 22:57:43 +03:00
|
|
|
(Implicit.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var ExplicitSameName = require(\"ExplicitProvidesModuleSameName\");
|
2017-01-26 22:57:43 +03:00
|
|
|
(ExplicitSameName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var ExplicitDifferentName = require(\"ExplicitProvidesModuleDifferentName\");
|
2017-01-11 18:16:38 +03:00
|
|
|
(ExplicitDifferentName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
"
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|