sugar-high 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export function highlight(code: string): string
2
+ export function tokenize(code: string): Array<[number, string]>
package/lib/index.mjs CHANGED
@@ -327,6 +327,11 @@ function generate(tokens) {
327
327
  return output
328
328
  }
329
329
 
330
+ /**
331
+ *
332
+ * @param {string} code
333
+ * @returns {string}
334
+ */
330
335
  export function highlight(code) {
331
336
  const tokens = tokenize(code)
332
337
  const output = generate(tokens).join('')
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "sugar-high",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "exports": "./lib/index.mjs",
6
6
  "description": "Super lightweight JSX syntax highlighter",
7
7
  "files": [
8
8
  "lib",
9
+ "index.d.ts",
9
10
  "*.md"
10
11
  ],
11
12
  "license": "MIT",