1// https://github.com/syntaxhighlighter/brush-typescript, modified for old API 2 3(function() 4{ 5 var regexLib = SyntaxHighlighter.regexLib; 6 7 function Brush() { 8 var keywords = 'break case catch class continue ' + 9 'default delete do else enum export extends false ' + 10 'for function if implements import in instanceof ' + 11 'interface let new null package private protected ' + 12 'static return super switch ' + 13 'this throw true try typeof var while with yield' + 14 ' any bool declare get module never number public readonly set string type'; // TypeScript-specific, everything above is common with JavaScript 15 16 this.regexList = [ 17 { 18 regex: regexLib.multiLineDoubleQuotedString, 19 css: 'string' 20 }, 21 { 22 regex: regexLib.multiLineSingleQuotedString, 23 css: 'string' 24 }, 25 { 26 regex: regexLib.singleLineCComments, 27 css: 'comments' 28 }, 29 { 30 regex: regexLib.multiLineCComments, 31 css: 'comments' 32 }, 33 { 34 regex: new RegExp(this.getKeywords(keywords), 'gm'), 35 css: 'keyword' 36 } 37 ]; 38 39 this.forHtmlScript(regexLib.scriptScriptTags); 40 }; 41 42 Brush.prototype = new SyntaxHighlighter.Highlighter(); 43 Brush.aliases = ['typescript', 'ts']; 44 45 SyntaxHighlighter.brushes.TypeScript = Brush; 46})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.