Page MenuHomePhabricator

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

Authored by mprobst on Aug 26 2019, 5:54 AM.



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.

Event Timeline

mprobst created this revision.Aug 26 2019, 5:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2019, 5:54 AM
krasimir accepted this revision.Aug 26 2019, 6:11 AM
This revision is now accepted and ready to land.Aug 26 2019, 6:11 AM
This revision was automatically updated to reflect the committed changes.