Function: typescript-ts-mode-maybe
typescript-ts-mode-maybe is an autoloaded and byte-compiled function
defined in typescript-ts-mode.el.gz.
Signature
(typescript-ts-mode-maybe)
Documentation
Enable typescript-ts-mode when its grammar is available.
Also propose to install the grammar when treesit-enabled-modes
is t or contains the mode name.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/typescript-ts-mode.el.gz
;;;###autoload
(defun typescript-ts-mode-maybe ()
"Enable `typescript-ts-mode' when its grammar is available.
Also propose to install the grammar when `treesit-enabled-modes'
is t or contains the mode name."
(declare-function treesit-language-available-p "treesit.c")
(if (or (treesit-language-available-p 'typescript)
(eq treesit-enabled-modes t)
(memq 'typescript-ts-mode treesit-enabled-modes))
(typescript-ts-mode)
(fundamental-mode)))