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.
Paths
| Differential D66736
clang-format: [JS] handle `as const`. ClosedPublic Authored by mprobst on Aug 26 2019, 5:54 AM.
Details 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
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Aug 26 2019, 6:11 AM Closed by commit rG5836472ac488: clang-format: [JS] handle `as const`. (authored by mprobst). · Explain WhyAug 26 2019, 8:39 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 217124 clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestJS.cpp
|