Skip to content

Flow type in template literal breaks highlighting #577

Closed
@char8x

Description

@char8x

From akamud/vscode-theme-onedark#87

Sample code

Extract from https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberClassComponent.js#L65

function(callback: mixed, callerName: string) {
  if (callback === null || typeof callback === 'function') {
    return;
  }
  const key = `${callerName}_${(callback: any)}`;
  if (!didWarnOnInvalidCallback[key]) {
    warning(
      false,
      '%s(...): Expected the last optional `callback` argument to be a ' +
        'function. Instead received: %s.',
      callerName,
      callback,
    );
    didWarnOnInvalidCallback[key] = true;
  }
};

Filename and Language selected

Using .js extension with JavaScript file type selected

Screenshot

image

Versions used

  • VSCode version: 1.20.1
  • OS Version: macOS 10.13.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions