@@ -948,9 +948,6 @@ def run(self, text):
948948 else :
949949 self .view .erase_status ("typescript_error" )
950950
951- def is_enabled (self ):
952- return is_typescript (self .view )
953-
954951
955952# go to definition command
956953class TypescriptGoToDefinitionCommand (sublime_plugin .TextCommand ):
@@ -1311,7 +1308,7 @@ def run(self, text, key = "", insertKey = True):
13111308
13121309# format a range of locations in the view
13131310def formatRange (text , view , begin , end ):
1314- if (not is_typescript (self . view )):
1311+ if (not is_typescript (view )):
13151312 print ("To run this command, please first assign a file name to the view" )
13161313 return
13171314 checkUpdateView (view )
@@ -1330,18 +1327,11 @@ def run(self, text):
13301327 r = self .view .sel ()[0 ]
13311328 formatRange (text , self .view , r .begin (), r .end ())
13321329
1333- def is_enabled (self ):
1334- return is_typescript (self .view )
1335-
1336-
13371330# command to format the entire buffer
13381331class TypescriptFormatDocument (sublime_plugin .TextCommand ):
13391332 def run (self , text ):
13401333 formatRange (text , self .view , 0 , self .view .size ())
13411334
1342- def is_enabled (self ):
1343- return is_typescript (self .view )
1344-
13451335
13461336nonBlankLinePattern = re .compile ("[\S]+" )
13471337
0 commit comments