HomePhabricator

clang-format: [JS] handle `as const`.

Authored by mprobst on Aug 26 2019, 8:37 AM.

Description

clang-format: [JS] handle as const.

Summary:
TypeScript 3.4 supports casting into a const type using as const:

const x = {x: 1} as const;

Previously, clang-format would insert a space after the const. With
this patch, no space is inserted after the sequence as const.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66736

llvm-svn: 369916