public static void GoToDefinition(ITextEditor editor) { TypeScriptContext context = GetContext(editor); UpdateContext(context, editor); DefinitionInfo[] definitions = context.GetDefinition(editor.FileName, editor.Caret.Offset); if ((definitions != null) && (definitions.Length > 0)) { GoToDefinition(definitions[0]); } }