[gtksourceview: 4/8] typescript.lang: Add support for "declare" class property modifier
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview: 4/8] typescript.lang: Add support for "declare" class property modifier
- Date: Fri, 15 Nov 2019 02:33:14 +0000 (UTC)
commit 76c70885688e8cc6c1325f8d71c922b181d693d0
Author: Jeffery To <jeffery to gmail com>
Date: Fri Nov 15 04:04:31 2019 +0800
typescript.lang: Add support for "declare" class property modifier
Added in TypeScript 3.7.
For use when using the useDefineForClassFields flag, also added in
TypeScript 3.7.
data/language-specs/typescript-js-functions-classes.lang | 1 +
tests/syntax-highlighting/file.ts | 1 +
tests/syntax-highlighting/file.tsx | 1 +
3 files changed, 3 insertions(+)
---
diff --git a/data/language-specs/typescript-js-functions-classes.lang
b/data/language-specs/typescript-js-functions-classes.lang
index 2f834514..02db5566 100644
--- a/data/language-specs/typescript-js-functions-classes.lang
+++ b/data/language-specs/typescript-js-functions-classes.lang
@@ -257,6 +257,7 @@
<context id="_class-body-member-modifier-keywords" style-ref="js:keyword">
<keyword>abstract</keyword>
+ <keyword>declare</keyword>
<keyword>readonly</keyword>
</context> <!-- /_class-body-member-modifier-keywords -->
diff --git a/tests/syntax-highlighting/file.ts b/tests/syntax-highlighting/file.ts
index 05ae9a24..39f538bc 100644
--- a/tests/syntax-highlighting/file.ts
+++ b/tests/syntax-highlighting/file.ts
@@ -443,6 +443,7 @@ a = class {
private property!: number;
protected static readonly property: number = 1;
abstract property;
+ declare property: number; // for useDefineForClassFields
// Accessibility modifiers, type annotation, parameter properties for constructor
private constructor(public x: number, private y?: string);
diff --git a/tests/syntax-highlighting/file.tsx b/tests/syntax-highlighting/file.tsx
index 53440f35..0b44e0df 100644
--- a/tests/syntax-highlighting/file.tsx
+++ b/tests/syntax-highlighting/file.tsx
@@ -546,6 +546,7 @@ a = class {
private property!: number;
protected static readonly property: number = 1;
abstract property;
+ declare property: number; // for useDefineForClassFields
// Accessibility modifiers, type annotation, parameter properties for constructor
private constructor(public x: number, private y?: string);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]