Skip to content

Incorrect TypeScript conversion #23

@charlesr1971

Description

@charlesr1971
import { createSelector } from '@ngrx/store';
export const selectShoppingCartItems = createSelector(
(state) => state.shoppingCart,
(shoppingCart) => shoppingCart.items
);
export const selectTotalItems = createSelector{
selectShoppingCartItems,
(items) => items.length
};

This is converted to:

import { createSelector } from '@ngrx/store';
export const selectShoppingCartItems = createSelector(
	(state) => state.shoppingCart,
		(shoppingCart) => shoppingCart.items
);
export const selectTotalItems = createSelector{
	selectShoppingCartItems,
	(items) => items.length
};

And here is the solution:

{
      $languages: "js",
      $name: "=",
      $excludeIf: [HTML_TAG_RULES],
      $startPatterns: [/=/],
      $endPatterns: [/[,;\)\]}]/, NEW_LINE_REGEX]
},

To:

{
      $languages: "js",
      $name: "=",
      $excludeIf: [HTML_TAG_RULES],
      $startPatterns: [/=(?!>)/],
      $endPatterns: [/[,;\)\]}]/, NEW_LINE_REGEX]
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions