You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Successfully remove the types from the following source:
// @flow
function createMessages<T>(a, b: T) {}
const MESSAGES = {
RECOMMENDED_EXACT_PICKUP_TIME: 'test – test', // <-- long dash here
}
createMessages<typeof MESSAGES>('UIKIT_PICKUP_TIME_FIELD', MESSAGES)
Actual behavior
Exit with error (when used with flow-remove-types/register):
createMessages<t 'UIKIT_PICKUP_TIME_FIELD',
^
SyntaxError: Invalid or unexpected token
at Object._compile (/Users/artem/Development/test/node_modules/flow-remove-types/node_modules/pirates/lib/index.js:91:24)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
Steps to reproduce
Run npx flow-node with the source showed above, you will see Unexpected identifier
Findings
Appearantly the problem is with the long-dash – symbol. If i replace it with the regular dash - everything worked correctly
The text was updated successfully, but these errors were encountered:
Flow-remove-types version:
2.104.0
Expected behavior
Successfully remove the types from the following source:
Actual behavior
Exit with error (when used with
flow-remove-types/register
):Steps to reproduce
Run
npx flow-node
with the source showed above, you will seeUnexpected identifier
Findings
Appearantly the problem is with the long-dash
–
symbol. If i replace it with the regular dash-
everything worked correctlyThe text was updated successfully, but these errors were encountered: