HomePhabricator

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

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

Details

Committed
mprobstAug 26 2019, 8:37 AM
Differential Revision
D66736: clang-format: [JS] handle `as const`.
Branches
Unknown
Tags
Unknown