Socket
Socket
Sign inDemoInstall

shiki-twoslash

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shiki-twoslash - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

6

CHANGELOG.md
# shiki-twoslash
## 3.1.2
### Patch Changes
- 7777f35: Fixed renderer completion result closing tag.
## 3.1.1

@@ -4,0 +10,0 @@

8

dist/shiki-twoslash.cjs.development.js

@@ -449,3 +449,3 @@ 'use strict';

var after = c.name.substr(((_query$completionsPre = query.completionsPrefix) == null ? void 0 : _query$completionsPre.length) || 0);
var name = "<span><span class='result-found'>" + (query.completionsPrefix || "") + "</span>" + after + "<span>";
var name = "<span><span class='result-found'>" + (query.completionsPrefix || "") + "</span>" + after + "</span>";
var isDeprecated = (_c$kindModifiers = c.kindModifiers) == null ? void 0 : _c$kindModifiers.split(",").includes("deprecated");

@@ -564,2 +564,4 @@ var liClass = isDeprecated ? "deprecated" : "";

compilerOptions: "The set of compiler options for your project",
allowArbitraryExtensions: "Enable importing files with any extension, provided a declaration file is present.",
allowImportingTsExtensions: "Allow imports to include TypeScript file extensions.",
allowJs: "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",

@@ -577,2 +579,3 @@ allowSyntheticDefaultImports: "Allow 'import x from y' when a module doesn't have a default export.",

composite: "Enable constraints that allow a TypeScript project to be used with project references.",
customConditions: "Conditions to set in addition to the resolver-specific defaults when resolving imports.",
declaration: "Generate .d.ts files from TypeScript and JavaScript files in your project.",

@@ -660,2 +663,4 @@ declarationDir: "Specify the output directory for generated declaration files.",

resolveJsonModule: "Enable importing .json files.",
resolvePackageJsonExports: "Use the package.json 'exports' field when resolving package imports.",
resolvePackageJsonImports: "Use the package.json 'imports' field when resolving imports.",
rootDir: "Specify the root folder within your source files.",

@@ -684,2 +689,3 @@ rootDirs: "Allow multiple folders to be treated as one when resolving modules.",

useUnknownInCatchVariables: "Default catch clause variables as `unknown` instead of `any`.",
verbatimModuleSyntax: "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.",
verbose: "Enable verbose logging.",

@@ -686,0 +692,0 @@ watchDirectory: "Specify how directories are watched on systems that lack recursive file-watching functionality.",

2

dist/shiki-twoslash.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("shiki"),t=require("@typescript/twoslash");function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}var n=function(e){var n="";return e.forEach((function(e){if("annotate"===e.name&&e.annotation){var o=e.annotation.split(" - "),a=o.pop(),s=(o[0]||"").trim(),l=s.includes("right"),c={flipped:l,arrowRot:"90deg 20px 20px",textDegree:"0deg",top:e.line+"em"};if(s.includes("{")){var p="{"+s.split("{")[1];try{c=i({},c,JSON.parse(p))}catch(i){throw new t.TwoslashError("Could not parse annotation","The annotation "+JSON.stringify(e)+" could convert '"+p+"' into JSON","Look at "+i.message+".")}}var d=r(c);n+="\n<div class='twoslash-annotation "+(l?"right":"left")+"' style=\"top: "+c.top+'">\n '+d+"\n <p class='twoslash-annotation-text' style=\"transform: rotate("+c.textDegree+')">'+a+"</p>\n</div>"}})),n},r=function(e){var t=e.flipped?"M27 39C26.5 32.7511 21.9 17.5173 7.5 6.57333M16.5 4.04L0.999999 0.999998C3.16667 4.88444 7.5 13.16 7.5 15.1867":"M1 39C1.5 32.7511 6.1 17.5173 20.5 6.57333M11.5 4.04L27 0.999998C24.8333 4.88444 20.5 13.16 20.5 15.1867",i=e.arrowRot.split(" ");return"<svg style='transform: translateX("+i[1]+") translateY("+i[2]+") rotate("+i[0]+');\' width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="'+t+'" stroke="black" />\n</svg>'};function o(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}var a=function(e){return!!Object.keys(e||{}).find((function(e){return!!e.includes("-")||!isNaN(parseInt(e))}))},s=function(e){var t=[];return Object.keys(e||{}).find((function(e){if(isNaN(parseInt(e))||t.push(parseInt(e)),e.includes("-"))for(var i=e.split("-"),n=i[0],r=parseInt(i[1])+1,o=parseInt(n);o<r;o++)t.push(o)})),function(e){return t.includes(e)}},l=function(e,t,i){var n=e.bg||"#fff",r=e.fg||"black",o=["shiki",e.themeName||"",t.class,t.title?"with-title":""].concat(i||[]).filter(Boolean).join(" ").trim(),a=Object.entries(t).filter((function(e){return["string","number","boolean"].includes(typeof e[1])&&!["class","twoslash"].includes(e[0])&&!1!==e[1]})).map((function(e){return e[0]+'="'+e[1]+'"'})).join(" ").trim();return'<pre class="'+o+'" style="background-color: '+n+"; color: "+r+'"'+(a?" "+a:"")+">"};function c(e,t,i){var n="";return n+=l(t,i,[]),i.title&&(n+="<div class='code-title'>"+i.title+"</div>"),t.langId&&(n+='<div class="language-id">'+t.langId+"</div>"),n+="<div class='code-container'><code>",(n=(n+=o(e)).replace(/\n*$/,""))+"</code></div></pre>"}function p(e,t,i,r){var c="",p=r.highlight&&a(r.highlight),g=s(r.highlight);i.tags&&i.tags.length&&(c+="<div class='tag-container'>"),c+=l(t,r,["twoslash","lsp"]),r.title&&(c+="<div class='code-title'>"+r.title+"</div>"),t.langId&&(c+='<div class="language-id">'+t.langId+"</div>"),c+="<div class='code-container'><code>";var m,y=d(i.errors,(function(e){return e.line}))||new Map,v=d(i.staticQuickInfos,(function(e){return e.line}))||new Map,w=d(i.queries,(function(e){return e.line-1}))||new Map,b=d(i.tags,(function(e){return e.line-1}))||new Map,S=0;return e.forEach((function(e,i){var n=y.get(i)||[],r=v.get(i)||[],a=w.get(i)||[],s=b.get(i)||[],l="<div class='line"+(p?g(i+1)?" highlight":" dim":"")+"'>";if(0===e.length&&0===i)S+=1;else if(0===e.length)c+=l+"&nbsp;</div>",S+=1;else{c+=l;var d=0;e.forEach((function(e){var i,o="",s=function(t){return function(i){return t<=i.character&&t+e.content.length>=i.character+i.length}},l=n.filter(s(d)),p=r.filter(s(d)),u=a.filter(s(d));i=i||p.find((function(e){return e.text===(a.length&&a[0].text)}));var f,h=[].concat(l,p,u).sort((function(e,t){return(e.start||0)-(t.start||0)}));o+=h.length?function(e,t,i){void 0===i&&(i="");var n=function(e){return"⇍"+e+"⇏"},r=function(e,t){switch(e.classes){case"lsp":var r=function(e){return e.replace(/"/g,"⃟")}(e.lsp||"");return n(t?"/data-lsp":"data-lsp lsp=¿"+r+"¿ "+(e.lsp===i?"style=⇯border-bottom: solid 2px lightgrey;⇯":""));case"query":return n((t?"/":"")+"data-highlight");case"err":default:return n((t?"/":"")+"data-err")}};e.sort((function(e,t){var i=function(e){return["err","query","lsp"].indexOf(null!=e?e:"")},n=0;return!(n=e.begin-t.begin)&&!(n=t.end-e.end)&&(n=i(e.classes)-i(t.classes)),n}));var o=0;return function(e){return e.replace(/⃟/g,'"')}(function(e){return e.replace(/⇍/g,"<").replace(/⇏/g,">").replace(/⇯/g,"'").replace(/¿/g,"'")}(function(e){var t={"<":"lt",'"':"quot","'":"apos","&":"amp","\r":"#13","\n":"#10"};return e.toString().replace(/[<"'\r\n&]/g,(function(e){return"&"+t[e]+";"}))}(function e(i){var n="",a=i.shift();return n+=t.substring(o,a.begin),o=a.begin,n+=r(a),i.some((function(e){return e.begin<a.end}))?n+=e(i):(n+=t.substring(a.begin,a.end),o=a.end),n+=r(a,!0),0!==i.length&&(n+=e(i)),n}(JSON.parse(JSON.stringify(e)))+t.substring(o))))}(h.map((function(e){var i={begin:e.start-S,end:e.start+e.length-S};return"renderedMessage"in e&&(i.classes="err"),"kind"in e&&(i.classes=e.kind),"targetString"in e&&(i.classes="lsp",i.lsp=t.includeJSDocInHover&&e.docs?e.docs+"\n\n"+e.text:e.text),i})),e.content,null==(f=i)?void 0:f.text):e.content.replace(/</g,"⇍").replace(/>/g,"⇏").replace(/'/g,"⇯"),c+='<span style="color: '+e.color+'">'+o+"</span>",d+=e.content.length,S+=e.content.length})),c+="</div>",S+=1}if(n.length){var m=n.map((function(e){return o(e.renderedMessage)})).join("</br>"),x=n.map((function(e){return e.code})).join("<br/>");c+='<span class="error"><span>'+m+'</span><span class="code">'+x+"</span></span>",c+='<span class="error-behind">'+m+"</span>"}a.length&&a.forEach((function(e){switch(c+="<div class='meta-line'>",e.kind){case"query":var t=o(e.text),n=(v.get(i)||[]).find((function(e){return e.text===(a.length&&a[0].text)}));c+="<span class='popover-prefix'>"+" ".repeat((n&&n.character+(null==n?void 0:n.length)/2)-1||0)+"</span><span class='popover'><div class='arrow'></div>"+t+"</span>";break;case"completions":if(e.completions){var r=e.completions.filter((function(t){return t.name.startsWith(e.completionsPrefix||"____")})).sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(t){var i,n,r=t.name.substr((null==(i=e.completionsPrefix)?void 0:i.length)||0),o="<span><span class='result-found'>"+(e.completionsPrefix||"")+"</span>"+r+"<span>";return"<li class='"+((null==(n=t.kindModifiers)?void 0:n.split(",").includes("deprecated"))?"deprecated":"")+"'>"+o+"</li>"})).join("");c+="&nbsp;".repeat(e.offset)+"<span class='inline-completions'><ul class='dropdown'>"+r+"</ul></span>"}else c+="<span class='query'>//"+"".padStart(e.offset-2)+"^ - No completions found</span>"}c+="</div>"})),s.length&&s.forEach((function(e){if(["error","warn","log"].includes(e.name)){switch(c+="<div class='meta-line logger "+e.name+"-log'>",e.name){case"error":c+=u+"<span class='message'>"+(e.annotation||"N/A")+"</span>";break;case"warn":c+=f+"<span class='message'>"+(e.annotation||"N/A")+"</span>";break;case"log":c+=h+"<span class='message'>"+(e.annotation||"N/A")+"</span>"}c+="</div>"}}))})),m=c.replace(/\n*$/,""),c=m.replace(/⇍/g,"&lt;").replace(/⇏/g,"&gt;").replace(/⇯/g,"&apos;"),c+=t.addTryButton?"</code><a class='playground-link' href='"+i.playgroundURL+"'>Try</a>":"</code>",c+="</div></pre>",i.tags&&i.tags.length&&(c+=n(i.tags),c+="</div>"),c}function d(e,t){var i=new Map;return e.forEach((function(e){var n=t(e),r=i.get(n);r?r.push(e):i.set(n,[e])})),i}var u='<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.63018 1.29289L1.29289 4.63018C1.10536 4.81772 1 5.07207 1 5.33729V13.6627C1 13.9279 1.10536 14.1823 1.29289 14.3698L4.63018 17.7071C4.81772 17.8946 5.07207 18 5.33729 18H13.6627C13.9279 18 14.1823 17.8946 14.3698 17.7071L17.7071 14.3698C17.8946 14.1823 18 13.9279 18 13.6627V5.33729C18 5.07207 17.8946 4.81772 17.7071 4.63018L14.3698 1.29289C14.1823 1.10536 13.9279 1 13.6627 1H5.33729C5.07207 1 4.81772 1.10536 4.63018 1.29289Z" fill="#E72622" stroke="#E72622"/><rect x="8" y="4" width="3" height="7" fill="white"/><rect x="8" y="13" width="3" height="3" fill="white"/></svg>',f='<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.63401 0.5C10.0189 -0.166667 10.9812 -0.166667 11.3661 0.5L20.4593 16.25C20.8442 16.9167 20.3631 17.75 19.5933 17.75H1.40676C0.636965 17.75 0.15584 16.9167 0.54074 16.25L9.63401 0.5Z" fill="#E5A604"/><rect x="9" y="4" width="3" height="7" fill="white"/><rect x="9" y="13" width="3" height="3" fill="white"/></svg>',h='<svg width="12" height="15" viewBox="0 0 12 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.76822 0.359816C5.41466 -0.0644613 4.78409 -0.121785 4.35982 0.231779C3.93554 0.585343 3.87821 1.21591 4.23178 1.64018L5.76822 0.359816ZM10 7L10.7926 7.60971L11.2809 6.97499L10.7682 6.35982L10 7ZM4.20738 12.8903C3.87064 13.328 3.95254 13.9559 4.39029 14.2926C4.82804 14.6294 5.45589 14.5475 5.79262 14.1097L4.20738 12.8903ZM4.23178 1.64018L9.23178 7.64018L10.7682 6.35982L5.76822 0.359816L4.23178 1.64018ZM9.20738 6.39029L4.20738 12.8903L5.79262 14.1097L10.7926 7.60971L9.20738 6.39029Z" fill="#BDBDBD"/><line y1="3.5" x2="4" y2="3.5" stroke="#BDBDBD"/><path d="M0 7H4" stroke="#BDBDBD"/><line y1="10.5" x2="4" y2="10.5" stroke="#BDBDBD"/></svg>';function g(e,t,i){var n="",r=i.highlight&&a(i.highlight),c=s(i.highlight);return n+=l(t,i,[]),i.title&&(n+="<div class='code-title'>"+i.title+"</div>"),t.langId&&(n+='<div class="language-id">'+t.langId+"</div>"),n+="<div class='code-container'><code>",e.forEach((function(e,t){if(0===e.length)n+="<div class='line'></div>";else{var i=r?c(t)?" highlight":" dim":"";n+="<div class='line"+i+"'>",e.forEach((function(e){n+='<span style="color: '+e.color+'">'+o(e.content)+"</span>"})),n+="</div>"}})),n=n.replace(/\n*$/,""),n+="</code></div></pre>"}var m={compilerOptions:"The set of compiler options for your project",allowJs:"Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",allowSyntheticDefaultImports:"Allow 'import x from y' when a module doesn't have a default export.",allowUmdGlobalAccess:"Allow accessing UMD globals from modules.",allowUnreachableCode:"Disable error reporting for unreachable code.",allowUnusedLabels:"Disable error reporting for unused labels.",alwaysStrict:"Ensure 'use strict' is always emitted.",assumeChangesOnlyAffectDirectDependencies:"Have recompiles in projects that use [`incremental`](#incremental) and `watch` mode assume that changes within a file will only affect files directly depending on it.",baseUrl:"Specify the base directory to resolve non-relative module names.",charset:"No longer supported. In early versions, manually set the text encoding for reading files.",checkJs:"Enable error reporting in type-checked JavaScript files.",clean:"Delete the outputs of all projects.",composite:"Enable constraints that allow a TypeScript project to be used with project references.",declaration:"Generate .d.ts files from TypeScript and JavaScript files in your project.",declarationDir:"Specify the output directory for generated declaration files.",declarationMap:"Create sourcemaps for d.ts files.",diagnostics:"Output compiler performance information after building.",disableFilenameBasedTypeAcquisition:"Disables inference for type acquisition by looking at filenames in a project.",disableReferencedProjectLoad:"Reduce the number of projects loaded automatically by TypeScript.",disableSizeLimit:"Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.",disableSolutionSearching:"Opt a project out of multi-project reference checking when editing.",disableSourceOfProjectReferenceRedirect:"Disable preferring source files instead of declaration files when referencing composite projects.",downlevelIteration:"Emit more compliant, but verbose and less performant JavaScript for iteration.",emitBOM:"Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",emitDeclarationOnly:"Only output d.ts files and not JavaScript files.",emitDecoratorMetadata:"Emit design-type metadata for decorated declarations in source files.",enable:"Disable the type acquisition for JavaScript projects.",esModuleInterop:"Emit additional JavaScript to ease support for importing CommonJS modules. This enables [`allowSyntheticDefaultImports`](#allowSyntheticDefaultImports) for type compatibility.",exactOptionalPropertyTypes:"Interpret optional property types as written, rather than adding `undefined`.",exclude:"Filters results from the [`include`](#include) option.",excludeDirectories:"Remove a list of directories from the watch process.",excludeFiles:"Remove a list of files from the watch mode's processing.",experimentalDecorators:"Enable experimental support for TC39 stage 2 draft decorators.",explainFiles:"Print files read during the compilation including why it was included.",extendedDiagnostics:"Output more detailed compiler performance information after building.",extends:"Specify one or more path or node module references to base configuration files from which settings are inherited.",fallbackPolling:"Specify what approach the watcher should use if the system runs out of native file watchers.",files:"Include a list of files. This does not support glob patterns, as opposed to [`include`](#include).",force:"Build all projects, including those that appear to be up to date.",forceConsistentCasingInFileNames:"Ensure that casing is correct in imports.",generateCpuProfile:"Emit a v8 CPU profile of the compiler run for debugging.",importHelpers:"Allow importing helper functions from tslib once per project, instead of including them per-file.",importsNotUsedAsValues:"Specify emit/checking behavior for imports that are only used for types.",include:"Specify a list of glob patterns that match files to be included in compilation.",incremental:"Save .tsbuildinfo files to allow for incremental compilation of projects.",inlineSourceMap:"Include sourcemap files inside the emitted JavaScript.",inlineSources:"Include source code in the sourcemaps inside the emitted JavaScript.",isolatedModules:"Ensure that each file can be safely transpiled without relying on other imports.",jsx:"Specify what JSX code is generated.",jsxFactory:"Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'.",jsxFragmentFactory:"Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.",jsxImportSource:"Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.",keyofStringsOnly:"Make keyof only return strings instead of string, numbers or symbols. Legacy option.",lib:"Specify a set of bundled library declaration files that describe the target runtime environment.",listEmittedFiles:"Print the names of emitted files after a compilation.",listFiles:"Print all of the files read during the compilation.",locale:"Set the language of the messaging from TypeScript. This does not affect emit.",mapRoot:"Specify the location where debugger should locate map files instead of generated locations.",maxNodeModuleJsDepth:"Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with [`allowJs`](#allowJs).",module:"Specify what module code is generated.",moduleDetection:"Control what method is used to detect the whether a JS file is a module.",moduleResolution:"Specify how TypeScript looks up a file from a given module specifier.",moduleSuffixes:"List of file name suffixes to search when resolving a module.",newLine:"Set the newline character for emitting files.",noEmit:"Disable emitting files from a compilation.",noEmitHelpers:"Disable generating custom helper functions like `__extends` in compiled output.",noEmitOnError:"Disable emitting files if any type checking errors are reported.",noErrorTruncation:"Disable truncating types in error messages.",noFallthroughCasesInSwitch:"Enable error reporting for fallthrough cases in switch statements.",noImplicitAny:"Enable error reporting for expressions and declarations with an implied `any` type.",noImplicitOverride:"Ensure overriding members in derived classes are marked with an override modifier.",noImplicitReturns:"Enable error reporting for codepaths that do not explicitly return in a function.",noImplicitThis:"Enable error reporting when `this` is given the type `any`.",noImplicitUseStrict:"Disable adding 'use strict' directives in emitted JavaScript files.",noLib:"Disable including any library files, including the default lib.d.ts.",noPropertyAccessFromIndexSignature:"Enforces using indexed accessors for keys declared using an indexed type.",noResolve:"Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.",noStrictGenericChecks:"Disable strict checking of generic signatures in function types.",noUncheckedIndexedAccess:"Add `undefined` to a type when accessed using an index.",noUnusedLocals:"Enable error reporting when local variables aren't read.",noUnusedParameters:"Raise an error when a function parameter isn't read.",out:"Deprecated setting. Use [`outFile`](#outFile) instead.",outDir:"Specify an output folder for all emitted files.",outFile:"Specify a file that bundles all outputs into one JavaScript file. If [`declaration`](#declaration) is true, also designates a file that bundles all .d.ts output.",paths:"Specify a set of entries that re-map imports to additional lookup locations.",plugins:"Specify a list of language service plugins to include.",preserveConstEnums:"Disable erasing `const enum` declarations in generated code.",preserveSymlinks:"Disable resolving symlinks to their realpath. This correlates to the same flag in node.",preserveValueImports:"Preserve unused imported values in the JavaScript output that would otherwise be removed.",preserveWatchOutput:"Disable wiping the console in watch mode.",pretty:"Enable color and formatting in TypeScript's output to make compiler errors easier to read.",reactNamespace:"Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.",references:"Specify an array of objects that specify paths for projects. Used in project references.",removeComments:"Disable emitting comments.",resolveJsonModule:"Enable importing .json files.",rootDir:"Specify the root folder within your source files.",rootDirs:"Allow multiple folders to be treated as one when resolving modules.",skipDefaultLibCheck:"Skip type checking .d.ts files that are included with TypeScript.",skipLibCheck:"Skip type checking all .d.ts files.",sourceMap:"Create source map files for emitted JavaScript files.",sourceRoot:"Specify the root path for debuggers to find the reference source code.",strict:"Enable all strict type-checking options.",strictBindCallApply:"Check that the arguments for `bind`, `call`, and `apply` methods match the original function.",strictFunctionTypes:"When assigning functions, check to ensure parameters and the return values are subtype-compatible.",strictNullChecks:"When type checking, take into account `null` and `undefined`.",strictPropertyInitialization:"Check for class properties that are declared but not set in the constructor.",stripInternal:"Disable emitting declarations that have `@internal` in their JSDoc comments.",suppressExcessPropertyErrors:"Disable reporting of excess property errors during the creation of object literals.",suppressImplicitAnyIndexErrors:"Suppress [`noImplicitAny`](#noImplicitAny) errors when indexing objects that lack index signatures.",synchronousWatchDirectory:"Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.",target:"Set the JavaScript language version for emitted JavaScript and include compatible library declarations.",traceResolution:"Log paths used during the [`moduleResolution`](#moduleResolution) process.",tsBuildInfoFile:"Specify the folder for .tsbuildinfo incremental compilation files.",typeAcquisition:"Specify options for automatic acquisition of declaration files.",typeRoots:"Specify multiple folders that act like `./node_modules/@types`.",types:"Specify type package names to be included without being referenced in a source file.",useDefineForClassFields:"Emit ECMAScript-standard-compliant class fields.",useUnknownInCatchVariables:"Default catch clause variables as `unknown` instead of `any`.",verbose:"Enable verbose logging.",watchDirectory:"Specify how directories are watched on systems that lack recursive file-watching functionality.",watchFile:"Specify how the TypeScript watch mode works."};function y(e,t,i){var n="";return n+=l(t,i,["tsconfig","lsp"]),i.title&&(n+='<div class="code-title">'+i.title+"</div>"),t.langId&&(n+='<div class="language-id">'+t.langId+"</div>"),n+="<div class='code-container'><code>",e.forEach((function(e){0===e.length?n+="<div class='line'></div>":(n+="<div class='line'>",e.forEach((function(e){if(function(e){return!!e.explanation&&e.explanation.find((function(e){return e.scopes.find((function(e){return e.scopeName.includes("support.type.property-name")}))}))}(e)&&function(e){if('"'!==e.content)return e.content.slice(1,e.content.length-1)in m}(e)){var t=e.content.slice(1,e.content.length-1);n+='<span style="color: '+e.color+'">"<a aria-hidden=true tabindex="-1" href=\'https://www.typescriptlang.org/tsconfig#'+t+"'><data-lsp lsp=\""+m[t]+'">'+o(t)+'</data-lsp></a>"</span>'}else n+='<span style="color: '+e.color+'">'+o(e.content)+"</span>"})),n+="</div>")})),n=n.replace(/\n*$/,""),n+="</code></div></pre>"}var v=null,w={plainTextRenderer:c,defaultShikiRenderer:g,twoslashRenderer:p,tsconfigJSONRenderer:y};exports.createShikiHighlighter=function(t){return v?Promise.resolve(v):e.getHighlighter(t).then((function(e){return v=e}))},exports.renderCodeToHTML=function(e,t,n,r,o,a){if(!o&&!v)throw new Error("The highlighter object hasn't been initialised via `setupHighLighter` yet in shiki-twoslash");var s,l=o||v,d=i({fg:l.getForegroundColor(),bg:l.getBackgroundColor()},r);try{s=l.codeToThemedTokens(e,"jsx"===t?"tsx":t)}catch(i){var u="\x3c!-- Note from shiki-twoslash: the language "+t+" was not set up for Shiki to use, and so there is no code highlighting --\x3e";return c(e,d,n)+u}return t&&n.twoslash&&a?p(s,i({},d,{langId:t}),a,n):t&&t.startsWith("json")&&n.tsconfig?y(s,d,n):g(s,i({},d,{langId:t}),n)},exports.renderers=w,exports.runTwoSlash=function(e,i,n){void 0===n&&(n={});var r=e,o={json5:"json",yml:"yaml"};if(o[i]&&(i=o[i]),["tsx","jsx"].includes(i)&&!n.disableImplicitReactImport&&!/^import\s+React(?:.*)\s+from\s+('|")react\1/gm.test(r)){var a="import React from 'react'\n",s="// ---cut---\n";r=r.includes(s)?r.split(s).map((function(e,t){return 0==t?a.concat(e):e})).join(s):[a,s,r].join("")}return n.customTags=["annotate","log","warn","error"],t.twoslasher(r,i,n)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("shiki"),t=require("@typescript/twoslash");function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}var n=function(e){var n="";return e.forEach((function(e){if("annotate"===e.name&&e.annotation){var o=e.annotation.split(" - "),a=o.pop(),s=(o[0]||"").trim(),l=s.includes("right"),c={flipped:l,arrowRot:"90deg 20px 20px",textDegree:"0deg",top:e.line+"em"};if(s.includes("{")){var p="{"+s.split("{")[1];try{c=i({},c,JSON.parse(p))}catch(i){throw new t.TwoslashError("Could not parse annotation","The annotation "+JSON.stringify(e)+" could convert '"+p+"' into JSON","Look at "+i.message+".")}}var d=r(c);n+="\n<div class='twoslash-annotation "+(l?"right":"left")+"' style=\"top: "+c.top+'">\n '+d+"\n <p class='twoslash-annotation-text' style=\"transform: rotate("+c.textDegree+')">'+a+"</p>\n</div>"}})),n},r=function(e){var t=e.flipped?"M27 39C26.5 32.7511 21.9 17.5173 7.5 6.57333M16.5 4.04L0.999999 0.999998C3.16667 4.88444 7.5 13.16 7.5 15.1867":"M1 39C1.5 32.7511 6.1 17.5173 20.5 6.57333M11.5 4.04L27 0.999998C24.8333 4.88444 20.5 13.16 20.5 15.1867",i=e.arrowRot.split(" ");return"<svg style='transform: translateX("+i[1]+") translateY("+i[2]+") rotate("+i[0]+');\' width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="'+t+'" stroke="black" />\n</svg>'};function o(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}var a=function(e){return!!Object.keys(e||{}).find((function(e){return!!e.includes("-")||!isNaN(parseInt(e))}))},s=function(e){var t=[];return Object.keys(e||{}).find((function(e){if(isNaN(parseInt(e))||t.push(parseInt(e)),e.includes("-"))for(var i=e.split("-"),n=i[0],r=parseInt(i[1])+1,o=parseInt(n);o<r;o++)t.push(o)})),function(e){return t.includes(e)}},l=function(e,t,i){var n=e.bg||"#fff",r=e.fg||"black",o=["shiki",e.themeName||"",t.class,t.title?"with-title":""].concat(i||[]).filter(Boolean).join(" ").trim(),a=Object.entries(t).filter((function(e){return["string","number","boolean"].includes(typeof e[1])&&!["class","twoslash"].includes(e[0])&&!1!==e[1]})).map((function(e){return e[0]+'="'+e[1]+'"'})).join(" ").trim();return'<pre class="'+o+'" style="background-color: '+n+"; color: "+r+'"'+(a?" "+a:"")+">"};function c(e,t,i){var n="";return n+=l(t,i,[]),i.title&&(n+="<div class='code-title'>"+i.title+"</div>"),t.langId&&(n+='<div class="language-id">'+t.langId+"</div>"),n+="<div class='code-container'><code>",(n=(n+=o(e)).replace(/\n*$/,""))+"</code></div></pre>"}function p(e,t,i,r){var c="",p=r.highlight&&a(r.highlight),g=s(r.highlight);i.tags&&i.tags.length&&(c+="<div class='tag-container'>"),c+=l(t,r,["twoslash","lsp"]),r.title&&(c+="<div class='code-title'>"+r.title+"</div>"),t.langId&&(c+='<div class="language-id">'+t.langId+"</div>"),c+="<div class='code-container'><code>";var m,y=d(i.errors,(function(e){return e.line}))||new Map,v=d(i.staticQuickInfos,(function(e){return e.line}))||new Map,w=d(i.queries,(function(e){return e.line-1}))||new Map,b=d(i.tags,(function(e){return e.line-1}))||new Map,S=0;return e.forEach((function(e,i){var n=y.get(i)||[],r=v.get(i)||[],a=w.get(i)||[],s=b.get(i)||[],l="<div class='line"+(p?g(i+1)?" highlight":" dim":"")+"'>";if(0===e.length&&0===i)S+=1;else if(0===e.length)c+=l+"&nbsp;</div>",S+=1;else{c+=l;var d=0;e.forEach((function(e){var i,o="",s=function(t){return function(i){return t<=i.character&&t+e.content.length>=i.character+i.length}},l=n.filter(s(d)),p=r.filter(s(d)),u=a.filter(s(d));i=i||p.find((function(e){return e.text===(a.length&&a[0].text)}));var f,h=[].concat(l,p,u).sort((function(e,t){return(e.start||0)-(t.start||0)}));o+=h.length?function(e,t,i){void 0===i&&(i="");var n=function(e){return"⇍"+e+"⇏"},r=function(e,t){switch(e.classes){case"lsp":var r=function(e){return e.replace(/"/g,"⃟")}(e.lsp||"");return n(t?"/data-lsp":"data-lsp lsp=¿"+r+"¿ "+(e.lsp===i?"style=⇯border-bottom: solid 2px lightgrey;⇯":""));case"query":return n((t?"/":"")+"data-highlight");case"err":default:return n((t?"/":"")+"data-err")}};e.sort((function(e,t){var i=function(e){return["err","query","lsp"].indexOf(null!=e?e:"")},n=0;return!(n=e.begin-t.begin)&&!(n=t.end-e.end)&&(n=i(e.classes)-i(t.classes)),n}));var o=0;return function(e){return e.replace(/⃟/g,'"')}(function(e){return e.replace(/⇍/g,"<").replace(/⇏/g,">").replace(/⇯/g,"'").replace(/¿/g,"'")}(function(e){var t={"<":"lt",'"':"quot","'":"apos","&":"amp","\r":"#13","\n":"#10"};return e.toString().replace(/[<"'\r\n&]/g,(function(e){return"&"+t[e]+";"}))}(function e(i){var n="",a=i.shift();return n+=t.substring(o,a.begin),o=a.begin,n+=r(a),i.some((function(e){return e.begin<a.end}))?n+=e(i):(n+=t.substring(a.begin,a.end),o=a.end),n+=r(a,!0),0!==i.length&&(n+=e(i)),n}(JSON.parse(JSON.stringify(e)))+t.substring(o))))}(h.map((function(e){var i={begin:e.start-S,end:e.start+e.length-S};return"renderedMessage"in e&&(i.classes="err"),"kind"in e&&(i.classes=e.kind),"targetString"in e&&(i.classes="lsp",i.lsp=t.includeJSDocInHover&&e.docs?e.docs+"\n\n"+e.text:e.text),i})),e.content,null==(f=i)?void 0:f.text):e.content.replace(/</g,"⇍").replace(/>/g,"⇏").replace(/'/g,"⇯"),c+='<span style="color: '+e.color+'">'+o+"</span>",d+=e.content.length,S+=e.content.length})),c+="</div>",S+=1}if(n.length){var m=n.map((function(e){return o(e.renderedMessage)})).join("</br>"),x=n.map((function(e){return e.code})).join("<br/>");c+='<span class="error"><span>'+m+'</span><span class="code">'+x+"</span></span>",c+='<span class="error-behind">'+m+"</span>"}a.length&&a.forEach((function(e){switch(c+="<div class='meta-line'>",e.kind){case"query":var t=o(e.text),n=(v.get(i)||[]).find((function(e){return e.text===(a.length&&a[0].text)}));c+="<span class='popover-prefix'>"+" ".repeat((n&&n.character+(null==n?void 0:n.length)/2)-1||0)+"</span><span class='popover'><div class='arrow'></div>"+t+"</span>";break;case"completions":if(e.completions){var r=e.completions.filter((function(t){return t.name.startsWith(e.completionsPrefix||"____")})).sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(t){var i,n,r=t.name.substr((null==(i=e.completionsPrefix)?void 0:i.length)||0),o="<span><span class='result-found'>"+(e.completionsPrefix||"")+"</span>"+r+"</span>";return"<li class='"+((null==(n=t.kindModifiers)?void 0:n.split(",").includes("deprecated"))?"deprecated":"")+"'>"+o+"</li>"})).join("");c+="&nbsp;".repeat(e.offset)+"<span class='inline-completions'><ul class='dropdown'>"+r+"</ul></span>"}else c+="<span class='query'>//"+"".padStart(e.offset-2)+"^ - No completions found</span>"}c+="</div>"})),s.length&&s.forEach((function(e){if(["error","warn","log"].includes(e.name)){switch(c+="<div class='meta-line logger "+e.name+"-log'>",e.name){case"error":c+=u+"<span class='message'>"+(e.annotation||"N/A")+"</span>";break;case"warn":c+=f+"<span class='message'>"+(e.annotation||"N/A")+"</span>";break;case"log":c+=h+"<span class='message'>"+(e.annotation||"N/A")+"</span>"}c+="</div>"}}))})),m=c.replace(/\n*$/,""),c=m.replace(/⇍/g,"&lt;").replace(/⇏/g,"&gt;").replace(/⇯/g,"&apos;"),c+=t.addTryButton?"</code><a class='playground-link' href='"+i.playgroundURL+"'>Try</a>":"</code>",c+="</div></pre>",i.tags&&i.tags.length&&(c+=n(i.tags),c+="</div>"),c}function d(e,t){var i=new Map;return e.forEach((function(e){var n=t(e),r=i.get(n);r?r.push(e):i.set(n,[e])})),i}var u='<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.63018 1.29289L1.29289 4.63018C1.10536 4.81772 1 5.07207 1 5.33729V13.6627C1 13.9279 1.10536 14.1823 1.29289 14.3698L4.63018 17.7071C4.81772 17.8946 5.07207 18 5.33729 18H13.6627C13.9279 18 14.1823 17.8946 14.3698 17.7071L17.7071 14.3698C17.8946 14.1823 18 13.9279 18 13.6627V5.33729C18 5.07207 17.8946 4.81772 17.7071 4.63018L14.3698 1.29289C14.1823 1.10536 13.9279 1 13.6627 1H5.33729C5.07207 1 4.81772 1.10536 4.63018 1.29289Z" fill="#E72622" stroke="#E72622"/><rect x="8" y="4" width="3" height="7" fill="white"/><rect x="8" y="13" width="3" height="3" fill="white"/></svg>',f='<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.63401 0.5C10.0189 -0.166667 10.9812 -0.166667 11.3661 0.5L20.4593 16.25C20.8442 16.9167 20.3631 17.75 19.5933 17.75H1.40676C0.636965 17.75 0.15584 16.9167 0.54074 16.25L9.63401 0.5Z" fill="#E5A604"/><rect x="9" y="4" width="3" height="7" fill="white"/><rect x="9" y="13" width="3" height="3" fill="white"/></svg>',h='<svg width="12" height="15" viewBox="0 0 12 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.76822 0.359816C5.41466 -0.0644613 4.78409 -0.121785 4.35982 0.231779C3.93554 0.585343 3.87821 1.21591 4.23178 1.64018L5.76822 0.359816ZM10 7L10.7926 7.60971L11.2809 6.97499L10.7682 6.35982L10 7ZM4.20738 12.8903C3.87064 13.328 3.95254 13.9559 4.39029 14.2926C4.82804 14.6294 5.45589 14.5475 5.79262 14.1097L4.20738 12.8903ZM4.23178 1.64018L9.23178 7.64018L10.7682 6.35982L5.76822 0.359816L4.23178 1.64018ZM9.20738 6.39029L4.20738 12.8903L5.79262 14.1097L10.7926 7.60971L9.20738 6.39029Z" fill="#BDBDBD"/><line y1="3.5" x2="4" y2="3.5" stroke="#BDBDBD"/><path d="M0 7H4" stroke="#BDBDBD"/><line y1="10.5" x2="4" y2="10.5" stroke="#BDBDBD"/></svg>';function g(e,t,i){var n="",r=i.highlight&&a(i.highlight),c=s(i.highlight);return n+=l(t,i,[]),i.title&&(n+="<div class='code-title'>"+i.title+"</div>"),t.langId&&(n+='<div class="language-id">'+t.langId+"</div>"),n+="<div class='code-container'><code>",e.forEach((function(e,t){if(0===e.length)n+="<div class='line'></div>";else{var i=r?c(t)?" highlight":" dim":"";n+="<div class='line"+i+"'>",e.forEach((function(e){n+='<span style="color: '+e.color+'">'+o(e.content)+"</span>"})),n+="</div>"}})),n=n.replace(/\n*$/,""),n+="</code></div></pre>"}var m={compilerOptions:"The set of compiler options for your project",allowArbitraryExtensions:"Enable importing files with any extension, provided a declaration file is present.",allowImportingTsExtensions:"Allow imports to include TypeScript file extensions.",allowJs:"Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",allowSyntheticDefaultImports:"Allow 'import x from y' when a module doesn't have a default export.",allowUmdGlobalAccess:"Allow accessing UMD globals from modules.",allowUnreachableCode:"Disable error reporting for unreachable code.",allowUnusedLabels:"Disable error reporting for unused labels.",alwaysStrict:"Ensure 'use strict' is always emitted.",assumeChangesOnlyAffectDirectDependencies:"Have recompiles in projects that use [`incremental`](#incremental) and `watch` mode assume that changes within a file will only affect files directly depending on it.",baseUrl:"Specify the base directory to resolve non-relative module names.",charset:"No longer supported. In early versions, manually set the text encoding for reading files.",checkJs:"Enable error reporting in type-checked JavaScript files.",clean:"Delete the outputs of all projects.",composite:"Enable constraints that allow a TypeScript project to be used with project references.",customConditions:"Conditions to set in addition to the resolver-specific defaults when resolving imports.",declaration:"Generate .d.ts files from TypeScript and JavaScript files in your project.",declarationDir:"Specify the output directory for generated declaration files.",declarationMap:"Create sourcemaps for d.ts files.",diagnostics:"Output compiler performance information after building.",disableFilenameBasedTypeAcquisition:"Disables inference for type acquisition by looking at filenames in a project.",disableReferencedProjectLoad:"Reduce the number of projects loaded automatically by TypeScript.",disableSizeLimit:"Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.",disableSolutionSearching:"Opt a project out of multi-project reference checking when editing.",disableSourceOfProjectReferenceRedirect:"Disable preferring source files instead of declaration files when referencing composite projects.",downlevelIteration:"Emit more compliant, but verbose and less performant JavaScript for iteration.",emitBOM:"Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",emitDeclarationOnly:"Only output d.ts files and not JavaScript files.",emitDecoratorMetadata:"Emit design-type metadata for decorated declarations in source files.",enable:"Disable the type acquisition for JavaScript projects.",esModuleInterop:"Emit additional JavaScript to ease support for importing CommonJS modules. This enables [`allowSyntheticDefaultImports`](#allowSyntheticDefaultImports) for type compatibility.",exactOptionalPropertyTypes:"Interpret optional property types as written, rather than adding `undefined`.",exclude:"Filters results from the [`include`](#include) option.",excludeDirectories:"Remove a list of directories from the watch process.",excludeFiles:"Remove a list of files from the watch mode's processing.",experimentalDecorators:"Enable experimental support for TC39 stage 2 draft decorators.",explainFiles:"Print files read during the compilation including why it was included.",extendedDiagnostics:"Output more detailed compiler performance information after building.",extends:"Specify one or more path or node module references to base configuration files from which settings are inherited.",fallbackPolling:"Specify what approach the watcher should use if the system runs out of native file watchers.",files:"Include a list of files. This does not support glob patterns, as opposed to [`include`](#include).",force:"Build all projects, including those that appear to be up to date.",forceConsistentCasingInFileNames:"Ensure that casing is correct in imports.",generateCpuProfile:"Emit a v8 CPU profile of the compiler run for debugging.",importHelpers:"Allow importing helper functions from tslib once per project, instead of including them per-file.",importsNotUsedAsValues:"Specify emit/checking behavior for imports that are only used for types.",include:"Specify a list of glob patterns that match files to be included in compilation.",incremental:"Save .tsbuildinfo files to allow for incremental compilation of projects.",inlineSourceMap:"Include sourcemap files inside the emitted JavaScript.",inlineSources:"Include source code in the sourcemaps inside the emitted JavaScript.",isolatedModules:"Ensure that each file can be safely transpiled without relying on other imports.",jsx:"Specify what JSX code is generated.",jsxFactory:"Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'.",jsxFragmentFactory:"Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.",jsxImportSource:"Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.",keyofStringsOnly:"Make keyof only return strings instead of string, numbers or symbols. Legacy option.",lib:"Specify a set of bundled library declaration files that describe the target runtime environment.",listEmittedFiles:"Print the names of emitted files after a compilation.",listFiles:"Print all of the files read during the compilation.",locale:"Set the language of the messaging from TypeScript. This does not affect emit.",mapRoot:"Specify the location where debugger should locate map files instead of generated locations.",maxNodeModuleJsDepth:"Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with [`allowJs`](#allowJs).",module:"Specify what module code is generated.",moduleDetection:"Control what method is used to detect the whether a JS file is a module.",moduleResolution:"Specify how TypeScript looks up a file from a given module specifier.",moduleSuffixes:"List of file name suffixes to search when resolving a module.",newLine:"Set the newline character for emitting files.",noEmit:"Disable emitting files from a compilation.",noEmitHelpers:"Disable generating custom helper functions like `__extends` in compiled output.",noEmitOnError:"Disable emitting files if any type checking errors are reported.",noErrorTruncation:"Disable truncating types in error messages.",noFallthroughCasesInSwitch:"Enable error reporting for fallthrough cases in switch statements.",noImplicitAny:"Enable error reporting for expressions and declarations with an implied `any` type.",noImplicitOverride:"Ensure overriding members in derived classes are marked with an override modifier.",noImplicitReturns:"Enable error reporting for codepaths that do not explicitly return in a function.",noImplicitThis:"Enable error reporting when `this` is given the type `any`.",noImplicitUseStrict:"Disable adding 'use strict' directives in emitted JavaScript files.",noLib:"Disable including any library files, including the default lib.d.ts.",noPropertyAccessFromIndexSignature:"Enforces using indexed accessors for keys declared using an indexed type.",noResolve:"Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.",noStrictGenericChecks:"Disable strict checking of generic signatures in function types.",noUncheckedIndexedAccess:"Add `undefined` to a type when accessed using an index.",noUnusedLocals:"Enable error reporting when local variables aren't read.",noUnusedParameters:"Raise an error when a function parameter isn't read.",out:"Deprecated setting. Use [`outFile`](#outFile) instead.",outDir:"Specify an output folder for all emitted files.",outFile:"Specify a file that bundles all outputs into one JavaScript file. If [`declaration`](#declaration) is true, also designates a file that bundles all .d.ts output.",paths:"Specify a set of entries that re-map imports to additional lookup locations.",plugins:"Specify a list of language service plugins to include.",preserveConstEnums:"Disable erasing `const enum` declarations in generated code.",preserveSymlinks:"Disable resolving symlinks to their realpath. This correlates to the same flag in node.",preserveValueImports:"Preserve unused imported values in the JavaScript output that would otherwise be removed.",preserveWatchOutput:"Disable wiping the console in watch mode.",pretty:"Enable color and formatting in TypeScript's output to make compiler errors easier to read.",reactNamespace:"Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.",references:"Specify an array of objects that specify paths for projects. Used in project references.",removeComments:"Disable emitting comments.",resolveJsonModule:"Enable importing .json files.",resolvePackageJsonExports:"Use the package.json 'exports' field when resolving package imports.",resolvePackageJsonImports:"Use the package.json 'imports' field when resolving imports.",rootDir:"Specify the root folder within your source files.",rootDirs:"Allow multiple folders to be treated as one when resolving modules.",skipDefaultLibCheck:"Skip type checking .d.ts files that are included with TypeScript.",skipLibCheck:"Skip type checking all .d.ts files.",sourceMap:"Create source map files for emitted JavaScript files.",sourceRoot:"Specify the root path for debuggers to find the reference source code.",strict:"Enable all strict type-checking options.",strictBindCallApply:"Check that the arguments for `bind`, `call`, and `apply` methods match the original function.",strictFunctionTypes:"When assigning functions, check to ensure parameters and the return values are subtype-compatible.",strictNullChecks:"When type checking, take into account `null` and `undefined`.",strictPropertyInitialization:"Check for class properties that are declared but not set in the constructor.",stripInternal:"Disable emitting declarations that have `@internal` in their JSDoc comments.",suppressExcessPropertyErrors:"Disable reporting of excess property errors during the creation of object literals.",suppressImplicitAnyIndexErrors:"Suppress [`noImplicitAny`](#noImplicitAny) errors when indexing objects that lack index signatures.",synchronousWatchDirectory:"Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.",target:"Set the JavaScript language version for emitted JavaScript and include compatible library declarations.",traceResolution:"Log paths used during the [`moduleResolution`](#moduleResolution) process.",tsBuildInfoFile:"Specify the folder for .tsbuildinfo incremental compilation files.",typeAcquisition:"Specify options for automatic acquisition of declaration files.",typeRoots:"Specify multiple folders that act like `./node_modules/@types`.",types:"Specify type package names to be included without being referenced in a source file.",useDefineForClassFields:"Emit ECMAScript-standard-compliant class fields.",useUnknownInCatchVariables:"Default catch clause variables as `unknown` instead of `any`.",verbatimModuleSyntax:"Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.",verbose:"Enable verbose logging.",watchDirectory:"Specify how directories are watched on systems that lack recursive file-watching functionality.",watchFile:"Specify how the TypeScript watch mode works."};function y(e,t,i){var n="";return n+=l(t,i,["tsconfig","lsp"]),i.title&&(n+='<div class="code-title">'+i.title+"</div>"),t.langId&&(n+='<div class="language-id">'+t.langId+"</div>"),n+="<div class='code-container'><code>",e.forEach((function(e){0===e.length?n+="<div class='line'></div>":(n+="<div class='line'>",e.forEach((function(e){if(function(e){return!!e.explanation&&e.explanation.find((function(e){return e.scopes.find((function(e){return e.scopeName.includes("support.type.property-name")}))}))}(e)&&function(e){if('"'!==e.content)return e.content.slice(1,e.content.length-1)in m}(e)){var t=e.content.slice(1,e.content.length-1);n+='<span style="color: '+e.color+'">"<a aria-hidden=true tabindex="-1" href=\'https://www.typescriptlang.org/tsconfig#'+t+"'><data-lsp lsp=\""+m[t]+'">'+o(t)+'</data-lsp></a>"</span>'}else n+='<span style="color: '+e.color+'">'+o(e.content)+"</span>"})),n+="</div>")})),n=n.replace(/\n*$/,""),n+="</code></div></pre>"}var v=null,w={plainTextRenderer:c,defaultShikiRenderer:g,twoslashRenderer:p,tsconfigJSONRenderer:y};exports.createShikiHighlighter=function(t){return v?Promise.resolve(v):e.getHighlighter(t).then((function(e){return v=e}))},exports.renderCodeToHTML=function(e,t,n,r,o,a){if(!o&&!v)throw new Error("The highlighter object hasn't been initialised via `setupHighLighter` yet in shiki-twoslash");var s,l=o||v,d=i({fg:l.getForegroundColor(),bg:l.getBackgroundColor()},r);try{s=l.codeToThemedTokens(e,"jsx"===t?"tsx":t)}catch(i){var u="\x3c!-- Note from shiki-twoslash: the language "+t+" was not set up for Shiki to use, and so there is no code highlighting --\x3e";return c(e,d,n)+u}return t&&n.twoslash&&a?p(s,i({},d,{langId:t}),a,n):t&&t.startsWith("json")&&n.tsconfig?y(s,d,n):g(s,i({},d,{langId:t}),n)},exports.renderers=w,exports.runTwoSlash=function(e,i,n){void 0===n&&(n={});var r=e,o={json5:"json",yml:"yaml"};if(o[i]&&(i=o[i]),["tsx","jsx"].includes(i)&&!n.disableImplicitReactImport&&!/^import\s+React(?:.*)\s+from\s+('|")react\1/gm.test(r)){var a="import React from 'react'\n",s="// ---cut---\n";r=r.includes(s)?r.split(s).map((function(e,t){return 0==t?a.concat(e):e})).join(s):[a,s,r].join("")}return n.customTags=["annotate","log","warn","error"],t.twoslasher(r,i,n)};
//# sourceMappingURL=shiki-twoslash.cjs.production.min.js.map

@@ -445,3 +445,3 @@ import { getHighlighter } from 'shiki';

var after = c.name.substr(((_query$completionsPre = query.completionsPrefix) == null ? void 0 : _query$completionsPre.length) || 0);
var name = "<span><span class='result-found'>" + (query.completionsPrefix || "") + "</span>" + after + "<span>";
var name = "<span><span class='result-found'>" + (query.completionsPrefix || "") + "</span>" + after + "</span>";
var isDeprecated = (_c$kindModifiers = c.kindModifiers) == null ? void 0 : _c$kindModifiers.split(",").includes("deprecated");

@@ -560,2 +560,4 @@ var liClass = isDeprecated ? "deprecated" : "";

compilerOptions: "The set of compiler options for your project",
allowArbitraryExtensions: "Enable importing files with any extension, provided a declaration file is present.",
allowImportingTsExtensions: "Allow imports to include TypeScript file extensions.",
allowJs: "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",

@@ -573,2 +575,3 @@ allowSyntheticDefaultImports: "Allow 'import x from y' when a module doesn't have a default export.",

composite: "Enable constraints that allow a TypeScript project to be used with project references.",
customConditions: "Conditions to set in addition to the resolver-specific defaults when resolving imports.",
declaration: "Generate .d.ts files from TypeScript and JavaScript files in your project.",

@@ -656,2 +659,4 @@ declarationDir: "Specify the output directory for generated declaration files.",

resolveJsonModule: "Enable importing .json files.",
resolvePackageJsonExports: "Use the package.json 'exports' field when resolving package imports.",
resolvePackageJsonImports: "Use the package.json 'imports' field when resolving imports.",
rootDir: "Specify the root folder within your source files.",

@@ -680,2 +685,3 @@ rootDirs: "Allow multiple folders to be treated as one when resolving modules.",

useUnknownInCatchVariables: "Default catch clause variables as `unknown` instead of `any`.",
verbatimModuleSyntax: "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.",
verbose: "Enable verbose logging.",

@@ -682,0 +688,0 @@ watchDirectory: "Specify how directories are watched on systems that lack recursive file-watching functionality.",

export declare const tsconfig: {
compilerOptions: string;
allowArbitraryExtensions: string;
allowImportingTsExtensions: string;
allowJs: string;

@@ -15,2 +17,3 @@ allowSyntheticDefaultImports: string;

composite: string;
customConditions: string;
declaration: string;

@@ -98,2 +101,4 @@ declarationDir: string;

resolveJsonModule: string;
resolvePackageJsonExports: string;
resolvePackageJsonImports: string;
rootDir: string;

@@ -122,2 +127,3 @@ rootDirs: string;

useUnknownInCatchVariables: string;
verbatimModuleSyntax: string;
verbose: string;

@@ -124,0 +130,0 @@ watchDirectory: string;

{
"name": "shiki-twoslash",
"version": "3.1.1",
"version": "3.1.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/shikijs/twoslash",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc