summaryrefslogtreecommitdiffstats
path: root/syntax/yats
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/yats')
-rw-r--r--syntax/yats/css.vim9
-rw-r--r--syntax/yats/dom-document.vim9
-rw-r--r--syntax/yats/dom-elem.vim9
-rw-r--r--syntax/yats/dom-event.vim9
-rw-r--r--syntax/yats/dom-form.vim9
-rw-r--r--syntax/yats/dom-node.vim9
-rw-r--r--syntax/yats/dom-storage.vim9
-rw-r--r--syntax/yats/ecma-402.vim9
-rw-r--r--syntax/yats/es6-array.vim9
-rw-r--r--syntax/yats/es6-date.vim9
-rw-r--r--syntax/yats/es6-function.vim9
-rw-r--r--syntax/yats/es6-json.vim9
-rw-r--r--syntax/yats/es6-map.vim9
-rw-r--r--syntax/yats/es6-math.vim9
-rw-r--r--syntax/yats/es6-number.vim9
-rw-r--r--syntax/yats/es6-object.vim9
-rw-r--r--syntax/yats/es6-promise.vim9
-rw-r--r--syntax/yats/es6-proxy.vim9
-rw-r--r--syntax/yats/es6-reflect.vim9
-rw-r--r--syntax/yats/es6-regexp.vim9
-rw-r--r--syntax/yats/es6-set.vim9
-rw-r--r--syntax/yats/es6-string.vim9
-rw-r--r--syntax/yats/es6-symbol.vim9
-rw-r--r--syntax/yats/event.vim9
-rw-r--r--syntax/yats/node.vim9
-rw-r--r--syntax/yats/test.vim9
-rw-r--r--syntax/yats/typescript.vim9
-rw-r--r--syntax/yats/web-blob.vim9
-rw-r--r--syntax/yats/web-console.vim9
-rw-r--r--syntax/yats/web-crypto.vim9
-rw-r--r--syntax/yats/web-encoding.vim9
-rw-r--r--syntax/yats/web-fetch.vim9
-rw-r--r--syntax/yats/web-geo.vim9
-rw-r--r--syntax/yats/web-history.vim9
-rw-r--r--syntax/yats/web-location.vim9
-rw-r--r--syntax/yats/web-navigator.vim9
-rw-r--r--syntax/yats/web-network.vim9
-rw-r--r--syntax/yats/web-payment.vim9
-rw-r--r--syntax/yats/web-service-worker.vim9
-rw-r--r--syntax/yats/web-window.vim9
-rw-r--r--syntax/yats/web-xhr.vim9
-rw-r--r--syntax/yats/web.vim9
42 files changed, 42 insertions, 336 deletions
diff --git a/syntax/yats/css.vim b/syntax/yats/css.vim
index 043fe1ba..af9baf69 100644
--- a/syntax/yats/css.vim
+++ b/syntax/yats/css.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/css.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptDOMStyle contained alignContent alignItems alignSelf animation
syntax keyword typescriptDOMStyle contained animationDelay animationDirection animationDuration
@@ -78,5 +73,3 @@ syntax keyword typescriptDOMStyle contained whiteSpace width willChange wordBrea
syntax keyword typescriptDOMStyle contained wordSpacing wordWrap writingMode zIndex
if exists("did_typescript_hilink") | HiLink typescriptDOMStyle Keyword
endif
-
-endif
diff --git a/syntax/yats/dom-document.vim b/syntax/yats/dom-document.vim
index 2063c522..0c506288 100644
--- a/syntax/yats/dom-document.vim
+++ b/syntax/yats/dom-document.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/dom-document.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptDOMDocProp contained activeElement body cookie defaultView
syntax keyword typescriptDOMDocProp contained designMode dir domain embeds forms head
@@ -39,5 +34,3 @@ syntax keyword typescriptDOMDocMethod contained querySelectorAll write writeln n
syntax cluster props add=typescriptDOMDocMethod
if exists("did_typescript_hilink") | HiLink typescriptDOMDocMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/dom-elem.vim b/syntax/yats/dom-elem.vim
index 23317a8a..438d0fd5 100644
--- a/syntax/yats/dom-elem.vim
+++ b/syntax/yats/dom-elem.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/dom-elem.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptDOMElemAttrs contained accessKey clientHeight clientLeft
syntax keyword typescriptDOMElemAttrs contained clientTop clientWidth id innerHTML
@@ -30,5 +25,3 @@ syntax keyword typescriptDOMElemFuncs contained setAttributeNodeNS setCapture su
syntax keyword typescriptDOMElemFuncs contained getAttribute
if exists("did_typescript_hilink") | HiLink typescriptDOMElemFuncs Keyword
endif
-
-endif
diff --git a/syntax/yats/dom-event.vim b/syntax/yats/dom-event.vim
index be08f14a..15a9a79d 100644
--- a/syntax/yats/dom-event.vim
+++ b/syntax/yats/dom-event.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/dom-event.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptDOMEventTargetMethod contained addEventListener removeEventListener nextgroup=typescriptEventFuncCallArg
syntax keyword typescriptDOMEventTargetMethod contained dispatchEvent waitUntil nextgroup=typescriptEventFuncCallArg
@@ -70,5 +65,3 @@ syntax keyword typescriptDOMEventMethod contained stopPropagation respondWith de
syntax cluster props add=typescriptDOMEventMethod
if exists("did_typescript_hilink") | HiLink typescriptDOMEventMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/dom-form.vim b/syntax/yats/dom-form.vim
index 8982bdfe..5ff6e88f 100644
--- a/syntax/yats/dom-form.vim
+++ b/syntax/yats/dom-form.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/dom-form.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptDOMFormProp contained acceptCharset action elements encoding
syntax keyword typescriptDOMFormProp contained enctype length method name target
@@ -16,5 +11,3 @@ syntax keyword typescriptDOMFormMethod contained reportValidity reset submit nex
syntax cluster props add=typescriptDOMFormMethod
if exists("did_typescript_hilink") | HiLink typescriptDOMFormMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/dom-node.vim b/syntax/yats/dom-node.vim
index 1367fa6b..c6cd3283 100644
--- a/syntax/yats/dom-node.vim
+++ b/syntax/yats/dom-node.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/dom-node.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptDOMNodeProp contained attributes baseURI baseURIObject childNodes
syntax keyword typescriptDOMNodeProp contained firstChild lastChild localName namespaceURI
@@ -32,5 +27,3 @@ syntax keyword typescriptDOMNodeType contained COMMENT_NODE DOCUMENT_NODE DOCUME
syntax keyword typescriptDOMNodeType contained DOCUMENT_FRAGMENT_NODE NOTATION_NODE
if exists("did_typescript_hilink") | HiLink typescriptDOMNodeType Keyword
endif
-
-endif
diff --git a/syntax/yats/dom-storage.vim b/syntax/yats/dom-storage.vim
index 198df139..19719e5a 100644
--- a/syntax/yats/dom-storage.vim
+++ b/syntax/yats/dom-storage.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/dom-storage.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptDOMStorage contained sessionStorage localStorage
if exists("did_typescript_hilink") | HiLink typescriptDOMStorage Keyword
@@ -19,5 +14,3 @@ syntax keyword typescriptDOMStorageMethod contained clear nextgroup=typescriptFu
syntax cluster props add=typescriptDOMStorageMethod
if exists("did_typescript_hilink") | HiLink typescriptDOMStorageMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/ecma-402.vim b/syntax/yats/ecma-402.vim
index d7d15ed6..fca87fdf 100644
--- a/syntax/yats/ecma-402.vim
+++ b/syntax/yats/ecma-402.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/ecma-402.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Intl
syntax keyword typescriptIntlMethod contained Collator DateTimeFormat NumberFormat nextgroup=typescriptFuncCallArg
@@ -13,5 +8,3 @@ syntax keyword typescriptIntlMethod contained PluralRules nextgroup=typescriptFu
syntax cluster props add=typescriptIntlMethod
if exists("did_typescript_hilink") | HiLink typescriptIntlMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-array.vim b/syntax/yats/es6-array.vim
index 7b91b44a..9ea46a11 100644
--- a/syntax/yats/es6-array.vim
+++ b/syntax/yats/es6-array.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-array.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Array nextgroup=typescriptGlobalArrayDot,typescriptFuncCallArg
syntax match typescriptGlobalArrayDot /\./ contained nextgroup=typescriptArrayStaticMethod,typescriptProp
@@ -21,5 +16,3 @@ syntax keyword typescriptArrayMethod contained toSource toString unshift nextgro
syntax cluster props add=typescriptArrayMethod
if exists("did_typescript_hilink") | HiLink typescriptArrayMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-date.vim b/syntax/yats/es6-date.vim
index 706d82ef..25403828 100644
--- a/syntax/yats/es6-date.vim
+++ b/syntax/yats/es6-date.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-date.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Date nextgroup=typescriptGlobalDateDot,typescriptFuncCallArg
syntax match typescriptGlobalDateDot /\./ contained nextgroup=typescriptDateStaticMethod,typescriptProp
@@ -29,5 +24,3 @@ syntax keyword typescriptDateMethod contained valueOf nextgroup=typescriptFuncCa
syntax cluster props add=typescriptDateMethod
if exists("did_typescript_hilink") | HiLink typescriptDateMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-function.vim b/syntax/yats/es6-function.vim
index 8c08aa3c..0f39d0be 100644
--- a/syntax/yats/es6-function.vim
+++ b/syntax/yats/es6-function.vim
@@ -1,16 +1,9 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-function.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function
syntax keyword typescriptFunctionMethod contained apply bind call nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptFunctionMethod
if exists("did_typescript_hilink") | HiLink typescriptFunctionMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-json.vim b/syntax/yats/es6-json.vim
index 1950012d..f1d1d488 100644
--- a/syntax/yats/es6-json.vim
+++ b/syntax/yats/es6-json.vim
@@ -1,16 +1,9 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-json.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName JSON nextgroup=typescriptGlobalJSONDot,typescriptFuncCallArg
syntax match typescriptGlobalJSONDot /\./ contained nextgroup=typescriptJSONStaticMethod,typescriptProp
syntax keyword typescriptJSONStaticMethod contained parse stringify nextgroup=typescriptFuncCallArg
if exists("did_typescript_hilink") | HiLink typescriptJSONStaticMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-map.vim b/syntax/yats/es6-map.vim
index 589b0ee0..97e2558d 100644
--- a/syntax/yats/es6-map.vim
+++ b/syntax/yats/es6-map.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-map.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Map WeakMap
syntax keyword typescriptES6MapProp contained size
@@ -17,5 +12,3 @@ syntax keyword typescriptES6MapMethod contained keys set values nextgroup=typesc
syntax cluster props add=typescriptES6MapMethod
if exists("did_typescript_hilink") | HiLink typescriptES6MapMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-math.vim b/syntax/yats/es6-math.vim
index 188a9b9a..0490f22e 100644
--- a/syntax/yats/es6-math.vim
+++ b/syntax/yats/es6-math.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-math.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Math nextgroup=typescriptGlobalMathDot,typescriptFuncCallArg
syntax match typescriptGlobalMathDot /\./ contained nextgroup=typescriptMathStaticProp,typescriptMathStaticMethod,typescriptProp
@@ -21,5 +16,3 @@ syntax keyword typescriptMathStaticMethod contained min pow random round sign si
syntax keyword typescriptMathStaticMethod contained sinh sqrt tan tanh trunc nextgroup=typescriptFuncCallArg
if exists("did_typescript_hilink") | HiLink typescriptMathStaticMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-number.vim b/syntax/yats/es6-number.vim
index f51e3c1e..1fb37cb6 100644
--- a/syntax/yats/es6-number.vim
+++ b/syntax/yats/es6-number.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-number.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Number nextgroup=typescriptGlobalNumberDot,typescriptFuncCallArg
syntax match typescriptGlobalNumberDot /\./ contained nextgroup=typescriptNumberStaticProp,typescriptNumberStaticMethod,typescriptProp
@@ -23,5 +18,3 @@ syntax keyword typescriptNumberMethod contained toPrecision toSource toString va
syntax cluster props add=typescriptNumberMethod
if exists("did_typescript_hilink") | HiLink typescriptNumberMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-object.vim b/syntax/yats/es6-object.vim
index 1b2f9c33..750571d7 100644
--- a/syntax/yats/es6-object.vim
+++ b/syntax/yats/es6-object.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-object.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Object nextgroup=typescriptGlobalObjectDot,typescriptFuncCallArg
syntax match typescriptGlobalObjectDot /\./ contained nextgroup=typescriptObjectStaticMethod,typescriptProp
@@ -24,5 +19,3 @@ syntax keyword typescriptObjectMethod contained setPrototypeOf nextgroup=typescr
syntax cluster props add=typescriptObjectMethod
if exists("did_typescript_hilink") | HiLink typescriptObjectMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-promise.vim b/syntax/yats/es6-promise.vim
index 6068cf94..5cb97747 100644
--- a/syntax/yats/es6-promise.vim
+++ b/syntax/yats/es6-promise.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-promise.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Promise nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg
syntax match typescriptGlobalPromiseDot /\./ contained nextgroup=typescriptPromiseStaticMethod,typescriptProp
@@ -16,5 +11,3 @@ syntax keyword typescriptPromiseMethod contained then catch finally nextgroup=ty
syntax cluster props add=typescriptPromiseMethod
if exists("did_typescript_hilink") | HiLink typescriptPromiseMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-proxy.vim b/syntax/yats/es6-proxy.vim
index 1c6398ec..6bfd693c 100644
--- a/syntax/yats/es6-proxy.vim
+++ b/syntax/yats/es6-proxy.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-proxy.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Proxy
syntax keyword typescriptProxyAPI contained getOwnPropertyDescriptor getOwnPropertyNames
@@ -14,5 +9,3 @@ syntax keyword typescriptProxyAPI contained preventExtensions has hasOwn get set
syntax keyword typescriptProxyAPI contained iterate ownKeys apply construct
if exists("did_typescript_hilink") | HiLink typescriptProxyAPI Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-reflect.vim b/syntax/yats/es6-reflect.vim
index 6b3da9ff..9bc7c6be 100644
--- a/syntax/yats/es6-reflect.vim
+++ b/syntax/yats/es6-reflect.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-reflect.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Reflect
syntax keyword typescriptReflectMethod contained apply construct defineProperty deleteProperty nextgroup=typescriptFuncCallArg
@@ -15,5 +10,3 @@ syntax keyword typescriptReflectMethod contained preventExtensions set setProtot
syntax cluster props add=typescriptReflectMethod
if exists("did_typescript_hilink") | HiLink typescriptReflectMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-regexp.vim b/syntax/yats/es6-regexp.vim
index 9a8d8725..dfa4932b 100644
--- a/syntax/yats/es6-regexp.vim
+++ b/syntax/yats/es6-regexp.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-regexp.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName RegExp nextgroup=typescriptGlobalRegExpDot,typescriptFuncCallArg
syntax match typescriptGlobalRegExpDot /\./ contained nextgroup=typescriptRegExpStaticProp,typescriptProp
@@ -20,5 +15,3 @@ syntax keyword typescriptRegExpMethod contained exec test nextgroup=typescriptFu
syntax cluster props add=typescriptRegExpMethod
if exists("did_typescript_hilink") | HiLink typescriptRegExpMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-set.vim b/syntax/yats/es6-set.vim
index b116d4fb..c6ce4695 100644
--- a/syntax/yats/es6-set.vim
+++ b/syntax/yats/es6-set.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-set.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Set WeakSet
syntax keyword typescriptES6SetProp contained size
@@ -17,5 +12,3 @@ syntax keyword typescriptES6SetMethod contained values nextgroup=typescriptFuncC
syntax cluster props add=typescriptES6SetMethod
if exists("did_typescript_hilink") | HiLink typescriptES6SetMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-string.vim b/syntax/yats/es6-string.vim
index acb6d5a2..99ce6c77 100644
--- a/syntax/yats/es6-string.vim
+++ b/syntax/yats/es6-string.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-string.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName String nextgroup=typescriptGlobalStringDot,typescriptFuncCallArg
syntax match typescriptGlobalStringDot /\./ contained nextgroup=typescriptStringStaticMethod,typescriptProp
@@ -23,5 +18,3 @@ syntax keyword typescriptStringMethod contained valueOf nextgroup=typescriptFunc
syntax cluster props add=typescriptStringMethod
if exists("did_typescript_hilink") | HiLink typescriptStringMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/es6-symbol.vim b/syntax/yats/es6-symbol.vim
index b0c2cb04..5935f5ef 100644
--- a/syntax/yats/es6-symbol.vim
+++ b/syntax/yats/es6-symbol.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/es6-symbol.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Symbol nextgroup=typescriptGlobalSymbolDot,typescriptFuncCallArg
syntax match typescriptGlobalSymbolDot /\./ contained nextgroup=typescriptSymbolStaticProp,typescriptSymbolStaticMethod,typescriptProp
@@ -18,5 +13,3 @@ endif
syntax keyword typescriptSymbolStaticMethod contained for keyFor nextgroup=typescriptFuncCallArg
if exists("did_typescript_hilink") | HiLink typescriptSymbolStaticMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/event.vim b/syntax/yats/event.vim
index 4fb2ff6f..46c54913 100644
--- a/syntax/yats/event.vim
+++ b/syntax/yats/event.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/event.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptAnimationEvent contained animationend animationiteration
syntax keyword typescriptAnimationEvent contained animationstart beginEvent endEvent
@@ -166,5 +161,3 @@ syntax keyword typescriptServiceWorkerEvent contained install activate fetch
syntax cluster events add=typescriptServiceWorkerEvent
if exists("did_typescript_hilink") | HiLink typescriptServiceWorkerEvent Title
endif
-
-endif
diff --git a/syntax/yats/node.vim b/syntax/yats/node.vim
index 98f859fd..375f7dbd 100644
--- a/syntax/yats/node.vim
+++ b/syntax/yats/node.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/node.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName global process
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName console Buffer
@@ -16,5 +11,3 @@ syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName setInte
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName clearInterval
if exists("did_typescript_hilink") | HiLink typescriptNodeGlobal Structure
endif
-
-endif
diff --git a/syntax/yats/test.vim b/syntax/yats/test.vim
index 7044a06a..bb4a60cb 100644
--- a/syntax/yats/test.vim
+++ b/syntax/yats/test.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/test.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName describe
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName it test before
@@ -14,5 +9,3 @@ syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName afterEa
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName beforeAll
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName afterAll
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName expect assert
-
-endif
diff --git a/syntax/yats/typescript.vim b/syntax/yats/typescript.vim
index 82a33ae1..5bdde783 100644
--- a/syntax/yats/typescript.vim
+++ b/syntax/yats/typescript.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/typescript.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Error EvalError
@@ -38,5 +33,3 @@ syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName encod
syntax cluster props add=typescriptGlobalMethod
if exists("did_typescript_hilink") | HiLink typescriptGlobalMethod Structure
endif
-
-endif
diff --git a/syntax/yats/web-blob.vim b/syntax/yats/web-blob.vim
index 7ec46b3a..b9f4c78a 100644
--- a/syntax/yats/web-blob.vim
+++ b/syntax/yats/web-blob.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-blob.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Blob BlobBuilder
syntax keyword typescriptGlobal containedin=typescriptIdentifierName File FileReader
@@ -44,5 +39,3 @@ endif
syntax keyword typescriptURLStaticMethod contained createObjectURL revokeObjectURL nextgroup=typescriptFuncCallArg
if exists("did_typescript_hilink") | HiLink typescriptURLStaticMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-console.vim b/syntax/yats/web-console.vim
index ad032579..ff40a3fa 100644
--- a/syntax/yats/web-console.vim
+++ b/syntax/yats/web-console.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-console.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName console
syntax keyword typescriptConsoleMethod contained count dir error group groupCollapsed nextgroup=typescriptFuncCallArg
@@ -14,5 +9,3 @@ syntax keyword typescriptConsoleMethod contained warn nextgroup=typescriptFuncCa
syntax cluster props add=typescriptConsoleMethod
if exists("did_typescript_hilink") | HiLink typescriptConsoleMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-crypto.vim b/syntax/yats/web-crypto.vim
index f4647e26..0e2f38aa 100644
--- a/syntax/yats/web-crypto.vim
+++ b/syntax/yats/web-crypto.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-crypto.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptCryptoGlobal containedin=typescriptIdentifierName crypto
if exists("did_typescript_hilink") | HiLink typescriptCryptoGlobal Structure
@@ -23,5 +18,3 @@ syntax keyword typescriptCryptoMethod contained getRandomValues nextgroup=typesc
syntax cluster props add=typescriptCryptoMethod
if exists("did_typescript_hilink") | HiLink typescriptCryptoMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-encoding.vim b/syntax/yats/web-encoding.vim
index 1ba7a34c..8728b5c2 100644
--- a/syntax/yats/web-encoding.vim
+++ b/syntax/yats/web-encoding.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-encoding.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextEncoder
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextDecoder
@@ -19,5 +14,3 @@ syntax keyword typescriptEncodingMethod contained encode decode nextgroup=typesc
syntax cluster props add=typescriptEncodingMethod
if exists("did_typescript_hilink") | HiLink typescriptEncodingMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-fetch.vim b/syntax/yats/web-fetch.vim
index 370bc493..7a815e91 100644
--- a/syntax/yats/web-fetch.vim
+++ b/syntax/yats/web-fetch.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-fetch.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Headers Request
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Response
@@ -35,5 +30,3 @@ syntax keyword typescriptResponseMethod contained clone nextgroup=typescriptFunc
syntax cluster props add=typescriptResponseMethod
if exists("did_typescript_hilink") | HiLink typescriptResponseMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-geo.vim b/syntax/yats/web-geo.vim
index 0777b435..b3d5e85a 100644
--- a/syntax/yats/web-geo.vim
+++ b/syntax/yats/web-geo.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-geo.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Geolocation
syntax keyword typescriptGeolocationMethod contained getCurrentPosition watchPosition nextgroup=typescriptFuncCallArg
@@ -13,5 +8,3 @@ syntax keyword typescriptGeolocationMethod contained clearWatch nextgroup=typesc
syntax cluster props add=typescriptGeolocationMethod
if exists("did_typescript_hilink") | HiLink typescriptGeolocationMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-history.vim b/syntax/yats/web-history.vim
index 38001023..e4f05850 100644
--- a/syntax/yats/web-history.vim
+++ b/syntax/yats/web-history.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-history.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptBOMHistoryProp contained length current next previous state
syntax keyword typescriptBOMHistoryProp contained scrollRestoration
@@ -16,5 +11,3 @@ syntax keyword typescriptBOMHistoryMethod contained back forward go pushState re
syntax cluster props add=typescriptBOMHistoryMethod
if exists("did_typescript_hilink") | HiLink typescriptBOMHistoryMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-location.vim b/syntax/yats/web-location.vim
index bac99ca1..6484f74b 100644
--- a/syntax/yats/web-location.vim
+++ b/syntax/yats/web-location.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-location.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptBOMLocationProp contained href protocol host hostname port
syntax keyword typescriptBOMLocationProp contained pathname search hash username password
@@ -17,5 +12,3 @@ syntax keyword typescriptBOMLocationMethod contained assign reload replace toStr
syntax cluster props add=typescriptBOMLocationMethod
if exists("did_typescript_hilink") | HiLink typescriptBOMLocationMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-navigator.vim b/syntax/yats/web-navigator.vim
index 800f4296..020212d3 100644
--- a/syntax/yats/web-navigator.vim
+++ b/syntax/yats/web-navigator.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-navigator.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptBOMNavigatorProp contained battery buildID connection cookieEnabled
syntax keyword typescriptBOMNavigatorProp contained doNotTrack maxTouchPoints oscpu
@@ -27,5 +22,3 @@ syntax keyword typescriptServiceWorkerMethod contained register nextgroup=typesc
syntax cluster props add=typescriptServiceWorkerMethod
if exists("did_typescript_hilink") | HiLink typescriptServiceWorkerMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-network.vim b/syntax/yats/web-network.vim
index 88969b0b..bffc3f52 100644
--- a/syntax/yats/web-network.vim
+++ b/syntax/yats/web-network.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-network.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName NetworkInformation
syntax keyword typescriptBOMNetworkProp contained downlink downlinkMax effectiveType
@@ -13,5 +8,3 @@ syntax keyword typescriptBOMNetworkProp contained rtt type
syntax cluster props add=typescriptBOMNetworkProp
if exists("did_typescript_hilink") | HiLink typescriptBOMNetworkProp Keyword
endif
-
-endif
diff --git a/syntax/yats/web-payment.vim b/syntax/yats/web-payment.vim
index ee41c25c..43b429db 100644
--- a/syntax/yats/web-payment.vim
+++ b/syntax/yats/web-payment.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-payment.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptGlobal containedin=typescriptIdentifierName PaymentRequest
syntax keyword typescriptPaymentMethod contained show abort canMakePayment nextgroup=typescriptFuncCallArg
@@ -40,5 +35,3 @@ syntax keyword typescriptPaymentShippingOptionProp contained id label amount sel
syntax cluster props add=typescriptPaymentShippingOptionProp
if exists("did_typescript_hilink") | HiLink typescriptPaymentShippingOptionProp Keyword
endif
-
-endif
diff --git a/syntax/yats/web-service-worker.vim b/syntax/yats/web-service-worker.vim
index 9f58e8ea..708a7b9d 100644
--- a/syntax/yats/web-service-worker.vim
+++ b/syntax/yats/web-service-worker.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-service-worker.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptServiceWorkerProp contained controller ready
syntax cluster props add=typescriptServiceWorkerProp
@@ -21,5 +16,3 @@ syntax keyword typescriptCacheMethod contained keys nextgroup=typescriptFuncCall
syntax cluster props add=typescriptCacheMethod
if exists("did_typescript_hilink") | HiLink typescriptCacheMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web-window.vim b/syntax/yats/web-window.vim
index 320aa37c..13a40f92 100644
--- a/syntax/yats/web-window.vim
+++ b/syntax/yats/web-window.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-window.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName applicationCache
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName closed
@@ -116,5 +111,3 @@ syntax keyword typescriptBOMWindowCons containedin=typescriptIdentifierName Quer
syntax keyword typescriptBOMWindowCons containedin=typescriptIdentifierName XMLSerializer
if exists("did_typescript_hilink") | HiLink typescriptBOMWindowCons Structure
endif
-
-endif
diff --git a/syntax/yats/web-xhr.vim b/syntax/yats/web-xhr.vim
index 8a29191c..ef70d0b2 100644
--- a/syntax/yats/web-xhr.vim
+++ b/syntax/yats/web-xhr.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web-xhr.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptXHRGlobal containedin=typescriptIdentifierName XMLHttpRequest
if exists("did_typescript_hilink") | HiLink typescriptXHRGlobal Structure
@@ -21,5 +16,3 @@ syntax keyword typescriptXHRMethod contained open overrideMimeType send setReque
syntax cluster props add=typescriptXHRMethod
if exists("did_typescript_hilink") | HiLink typescriptXHRMethod Keyword
endif
-
-endif
diff --git a/syntax/yats/web.vim b/syntax/yats/web.vim
index 96050351..fa7d3693 100644
--- a/syntax/yats/web.vim
+++ b/syntax/yats/web.vim
@@ -1,11 +1,6 @@
-let s:base = expand("<sfile>:h:h")
-let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
-let files = filter(globpath(&rtp, 'syntax/yats/web.vim', 1, 1), Filter)
-if len(files) > 0
- exec 'source ' . files[0]
+if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p'))
finish
endif
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbortController
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbstractWorker AnalyserNode
@@ -256,5 +251,3 @@ syntax keyword typescriptBOM containedin=typescriptIdentifierName XDomainRequest
syntax keyword typescriptBOM containedin=typescriptIdentifierName XMLHttpRequestEventTarget
if exists("did_typescript_hilink") | HiLink typescriptBOM Structure
endif
-
-endif