Skip to content

Commit

Permalink
build TS types for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
KonnorRogers committed Nov 27, 2023
1 parent 6888743 commit 5dfc768
Show file tree
Hide file tree
Showing 305 changed files with 1,426 additions and 128 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ node_modules

benchmark/remotes/
benchmark/downloads/
components/*.d.ts
prism-core.d.ts
prism.d.ts
4 changes: 4 additions & 0 deletions components/prism-abap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions components/prism-abnf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['abnf']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-actionscript.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as javascriptLoader } from "./prism-javascript.js"
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
4 changes: 4 additions & 0 deletions components/prism-ada.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['ada']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-agda.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['agda']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-al.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
// based on https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage

export function loader (Prism, options) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-antlr4.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['antlr4']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-apacheconf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions components/prism-apex.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as clikeLoader } from "./prism-clike.js"
import { loader as sqlLoader } from "./prism-sql.js"
export function loader (Prism, options) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-apl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['apl']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-applescript.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['applescript']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-aql.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['aql']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-arduino.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions components/prism-arff.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['arff']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-armasm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['armasm']) {
Expand Down
12 changes: 5 additions & 7 deletions components/prism-arturo.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { loader as bashLoader } from "./prism-bash.js"
import { loader as cssLoader } from "./prism-css.js"
import { loader as javascriptLoader } from "./prism-javascript.js"
import { loader as markupLoader } from "./prism-markup.js"
import { loader as markdownLoader } from "./prism-markdown.js"
import { loader as sqlLoader } from "./prism-sql.js"
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['arturo']) {
Expand All @@ -12,7 +10,7 @@ export function loader (Prism, options) {

/**
* @param {string} lang
* @param {string} pattern
* @param {string} [pattern]
*/
var createLanguageString = function (lang, pattern) {
return {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-asciidoc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['asciidoc']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-asm6502.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['asm6502']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-asmatmel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['asmatmel']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-aspnet.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as markupLoader } from "./prism-markup.js"
import { loader as csharpLoader } from "./prism-csharp.js"
import { loader as javascriptLoader } from "./prism-javascript.js"
Expand Down
4 changes: 4 additions & 0 deletions components/prism-autohotkey.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions components/prism-autoit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['autoit']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-avisynth.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
// http://avisynth.nl/index.php/The_full_AviSynth_grammar
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
4 changes: 4 additions & 0 deletions components/prism-avro-idl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
// GitHub: https://github.com/apache/avro
// Docs: https://avro.apache.org/docs/current/idl.html

Expand Down
4 changes: 4 additions & 0 deletions components/prism-awk.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['awk']) {
Expand Down
9 changes: 8 additions & 1 deletion components/prism-bash.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bash']) {
Expand Down Expand Up @@ -229,7 +233,10 @@ export function loader (Prism, options) {
'punctuation',
'number'
];
var inside = insideString.variable[1].inside;


var inside = /** @type {any} */ (insideString.variable[1]).inside;

for (var i = 0; i < toBeCopied.length; i++) {
inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]];
}
Expand Down
4 changes: 4 additions & 0 deletions components/prism-basic.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['basic']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-batch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['batch']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bbcode.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bbcode']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bbj.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bbj']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bicep.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bicep']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-birb.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as clikeLoader } from "./prism-clike.js"
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bison.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as cLoader } from "./prism-c.js"
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bnf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bnf']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bqn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bqn']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-brainfuck.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['brainfuck']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-brightscript.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['brightscript']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bro.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bro']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-bsl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['bsl']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-c.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as clikeLoader } from "./prism-clike.js"
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
4 changes: 4 additions & 0 deletions components/prism-cfscript.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as clikeLoader } from "./prism-clike.js"
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
4 changes: 4 additions & 0 deletions components/prism-chaiscript.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as clikeLoader } from "./prism-clike.js"
import { loader as cppLoader } from "./prism-cpp.js"
export function loader (Prism, options) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-cil.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
if (options?.force !== true && Prism.languages['cil']) {
Expand Down
4 changes: 4 additions & 0 deletions components/prism-cilkc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as cLoader } from "./prism-c.js"
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
4 changes: 4 additions & 0 deletions components/prism-cilkcpp.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {import("../prism.js").Prism} Prism
* @param {import("../prism.js").LoaderOptions} [options]
*/
import { loader as cppLoader } from "./prism-cpp.js"
export function loader (Prism, options) {
if (typeof Prism === 'undefined') return
Expand Down
Loading

0 comments on commit 5dfc768

Please sign in to comment.