UNPKG

reprism

Version:

Modular Syntax highlighting for the web

17 lines (15 loc) 928 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { language: 'typescript', init: function init(Prism) { Prism.languages.typescript = Prism.languages.extend('javascript', { // From JavaScript Prism keyword list and TypeScript language spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#221-reserved-words 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/, builtin: /\b(?:string|Function|any|number|boolean|Array|symbol|console)\b/ }); Prism.languages.ts = Prism.languages.typescript; } };