From 278a610ae3926634f7e06413a9e47ceaed419e5b Mon Sep 17 00:00:00 2001 From: Martin <7252614+Lhoerion@users.noreply.github.com> Date: Tue, 19 May 2020 19:43:26 +0200 Subject: [PATCH] fix(typescript) Add missing `readonly` keyword (#2562) --- CHANGES.md | 2 ++ src/languages/typescript.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 294ba0defb..efb45e530b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,7 @@ Deprecations: Language Improvements: +- fix(typescript) add `readonly` keyword (#2562) [Martin (Lhoerion)][] - fix(javascript) fix regex inside parens after a non-regex (#2530) [Josh Goebel][] - enh(typescript) use identifier to match potential keywords, preventing false positivites (#2519) [Josh Goebel][] - enh(javascript) use identifier to match potential keywords, preventing false positivites (#2519) [Josh Goebel][] @@ -49,6 +50,7 @@ Language Improvements: [Sam Rawlins]: https://github.com/srawlins [Sergey Prokhorov]: https://github.com/seriyps [Nils Knappmeier]: https://github.com/nknapp +[Martin (Lhoerion)]: https://github.com/Lhoerion ## Version 10.0.2 diff --git a/src/languages/typescript.js b/src/languages/typescript.js index c912157cdc..e44ee9a86f 100644 --- a/src/languages/typescript.js +++ b/src/languages/typescript.js @@ -31,7 +31,8 @@ export default function(hljs) { "protected", "implements", "declare", - "abstract" + "abstract", + "readonly" ]; var KEYWORDS = { $pattern: ECMAScript.IDENT_RE,