prettier/tests/flow/declaration_files_increment.../__snapshots__/jsfmt.spec.js.snap

102 lines
2.9 KiB
Plaintext
Raw Normal View History

exports[`test A.js 1`] = `
"/* @providesModule A */
class Implementation {}
export function foo(): Implementation { return new Implementation; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @providesModule A */
class Implementation {}
export function foo(): Implementation {
return new Implementation();
2017-01-11 18:16:38 +03:00
}
"
`;
exports[`test ExplicitProvidesModuleDifferentName.js 1`] = `
"/*
* @providesModule ExplicitProvidesModuleDifferentName
* @flow
*/
class Implementation {}
module.exports.fun = (): Implementation => new Implementation;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/*
* @providesModule ExplicitProvidesModuleDifferentName
* @flow
*/
class Implementation {}
2017-01-11 18:16:38 +03:00
module.exports.fun = (): Implementation => new Implementation();
"
`;
exports[`test ExplicitProvidesModuleSameName.js 1`] = `
"/*
* @providesModule ExplicitProvidesModuleSameName
* @flow
*/
class Implementation {}
module.exports.fun = (): Implementation => new Implementation;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/*
* @providesModule ExplicitProvidesModuleSameName
* @flow
*/
class Implementation {}
2017-01-11 18:16:38 +03:00
module.exports.fun = (): Implementation => new Implementation();
"
`;
exports[`test ImplicitProvidesModule.js 1`] = `
"/*
* @providesModule ImplicitProvidesModule
* @flow
*/
class Implementation {}
module.exports.fun = (): Implementation => new Implementation;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/*
* @providesModule ImplicitProvidesModule
* @flow
*/
class Implementation {}
2017-01-11 18:16:38 +03:00
module.exports.fun = (): Implementation => new Implementation();
"
`;
exports[`test md5.js 1`] = `
"/* @providesModule md5 */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-01-11 18:16:38 +03:00
"
`;
exports[`test test.js 1`] = `
"/* @flow */
2016-12-30 19:56:42 +03:00
var Implicit = require(\'ImplicitProvidesModule\');
(Implicit.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
2016-12-30 19:56:42 +03:00
var ExplicitSameName = require(\'ExplicitProvidesModuleSameName\');
(ExplicitSameName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
2016-12-30 19:56:42 +03:00
var ExplicitDifferentName = require(\'ExplicitProvidesModuleDifferentName\');
(ExplicitDifferentName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @flow */
2016-12-30 19:56:42 +03:00
var Implicit = require(\"ImplicitProvidesModule\");
(Implicit.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
2016-12-30 19:56:42 +03:00
var ExplicitSameName = require(\"ExplicitProvidesModuleSameName\");
(ExplicitSameName.fun(): boolean); // Error: Either Implementation ~> boolean or Declaration ~> boolean
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
"
`;