UNPKG

742 BJavaScriptView Raw
1Prism.languages.typescript = Prism.languages.extend('javascript', {
2 // From JavaScript Prism keyword list and TypeScript language spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#221-reserved-words
3 'keyword': /\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield|module|declare|constructor|namespace|abstract|require|type)\b/,
4 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console)\b/,
5});
6
7Prism.languages.ts = Prism.languages.typescript;
\No newline at end of file