From ca613255b8579336481d68299628efd0a2c41f24 Mon Sep 17 00:00:00 2001 From: crimx Date: Mon, 9 Dec 2024 10:34:51 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20wopjs/ts?= =?UTF-8?q?ur@a4c5dd9ca356d92a590dd1940f357ba91644c2bc=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/hierarchy.js | 2 +- assets/main.js | 8 ++-- assets/navigation.js | 2 +- assets/search.js | 2 +- assets/style.css | 12 ++--- classes/index.Option.html | 68 ++++++++++++++-------------- classes/index.Result.html | 68 ++++++++++++++-------------- functions/index.Err-1.html | 2 +- functions/index.Ok-1.html | 2 +- functions/index.Some-1.html | 2 +- functions/index.filterMap.html | 2 +- functions/index.first.html | 2 +- functions/index.firstIndex.html | 2 +- functions/index.firstMap.html | 2 +- functions/index.last.html | 2 +- functions/index.lastIndex.html | 2 +- functions/index.lastMap.html | 2 +- functions/index.mapWhile.html | 2 +- functions/index.reduceWhile.html | 2 +- index.html | 2 +- interfaces/index.ResultMatcher.html | 4 +- interfaces/patches_array.Array.html | 20 ++++---- types/index.Err.html | 2 +- types/index.None.html | 2 +- types/index.Ok.html | 2 +- types/index.Some.html | 2 +- types/index.UnwrapErr.html | 2 +- types/index.UnwrapOk.html | 2 +- types/index.UnwrapOption.html | 2 +- variables/index.None-1.html | 2 +- variables/patches_array.Array-1.html | 2 +- 31 files changed, 115 insertions(+), 115 deletions(-) diff --git a/assets/hierarchy.js b/assets/hierarchy.js index 29ebd73..fb85f0a 100644 --- a/assets/hierarchy.js +++ b/assets/hierarchy.js @@ -1 +1 @@ -window.hierarchyData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6tWKsrPLylWsoqO1VEqSk3LSU0uyczPK1ayqq6tBQAWeT+5HQAAAA==" \ No newline at end of file +window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzytWsqqurQUAmx4Kpg==" \ No newline at end of file diff --git a/assets/main.js b/assets/main.js index e0af265..4f59cd9 100644 --- a/assets/main.js +++ b/assets/main.js @@ -1,9 +1,9 @@ "use strict"; window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings.","hierarchy_expand":"Expand","hierarchy_collapse":"Collapse"}; -"use strict";(()=>{var De=Object.create;var ae=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var Fe=Object.getOwnPropertyNames;var Ne=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var Ve=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var je=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fe(e))!Be.call(t,i)&&i!==n&&ae(t,i,{get:()=>e[i],enumerable:!(r=Ae(e,i))||r.enumerable});return t};var qe=(t,e,n)=>(n=t!=null?De(Ne(t)):{},je(e||!t||!t.__esModule?ae(n,"default",{value:t,enumerable:!0}):n,t));var he=Ve((ue,de)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,c],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[c+1]*i[d+1],c+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new t.TokenSet;s.node.edges["*"]=c}s.str.length==1&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),f;m in s.node.edges?f=s.node.edges[m]:(f=new t.TokenSet,s.node.edges[m]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ue=="object"?de.exports=n():e.lunr=n()}(this,function(){return t})})()});window.translations||={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse"};var le=[];function J(t,e){le.push({selector:e,constructor:t})}var U=class{alwaysVisibleMember=null;constructor(){this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){le.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!$e(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function $e(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var ce=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var ye=qe(he(),1);async function fe(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=ye.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function ge(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:document.documentElement.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{fe(e,t)}),fe(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{ne(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),ze(t,i,r,e)}function ze(t,e,n,r){n.addEventListener("input",ce(()=>{We(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Ue(e,t):i.key=="ArrowUp"?(pe(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(pe(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),ne(t))})}function ne(t){t.classList.remove("has-focus")}function We(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=me(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${me(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=c+d,m.append(f),f.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function pe(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Ue(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),ne(e)}}function me(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(te(t.substring(s,o)),`${te(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(te(t.substring(s))),i.join("")}var Je={"&":"&","<":"<",">":">","'":"'",'"':"""};function te(t){return t.replace(/[&<>"'"]/g,e=>Je[e])}var I=class{el;app;constructor(e){this.el=e.el,this.app=e.app}};var H="mousedown",xe="mousemove",B="mouseup",G={x:0,y:0},ve=!1,re=!1,Ge=!1,D=!1,Ee=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Ee?"is-mobile":"not-mobile");Ee&&"ontouchstart"in document.documentElement&&(Ge=!0,H="touchstart",xe="touchmove",B="touchend");document.addEventListener(H,t=>{re=!0,D=!1;let e=H=="touchstart"?t.targetTouches[0]:t;G.y=e.pageY||0,G.x=e.pageX||0});document.addEventListener(xe,t=>{if(re&&!D){let e=H=="touchstart"?t.targetTouches[0]:t,n=G.x-(e.pageX||0),r=G.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{re=!1});document.addEventListener("click",t=>{ve&&(t.preventDefault(),t.stopImmediatePropagation(),ve=!1)});var X=class extends I{active;className;constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(H,n=>this.onDocumentPointerDown(n)),document.addEventListener(B,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var ie;try{ie=localStorage}catch{ie={getItem(){return null},setItem(){}}}var C=ie;var we=document.head.appendChild(document.createElement("style"));we.dataset.for="filters";var Y=class extends I{key;value;constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),we.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=C.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){C.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var se=new Map,oe=class{open;accordions=[];key;constructor(e,n){this.key=e,this.open=n}add(e){this.accordions.push(e),e.open=this.open,e.addEventListener("toggle",()=>{this.toggle(e.open)})}toggle(e){for(let n of this.accordions)n.open=e;C.setItem(this.key,e.toString())}},Z=class extends I{constructor(e){super(e);let n=this.el.querySelector("summary"),r=n.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)});let i=`tsd-accordion-${n.dataset.key??n.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`,s;if(se.has(i))s=se.get(i);else{let o=C.getItem(i),a=o?o==="true":this.el.open;s=new oe(i,a),se.set(i,s)}s.add(this.el)}};function be(t){let e=C.getItem("tsd-theme")||"os";t.value=e,Le(e),t.addEventListener("change",()=>{C.setItem("tsd-theme",t.value),Le(t.value)})}function Le(t){document.documentElement.dataset.theme=t}var K;function ke(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Se),Se())}async function Se(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=document.documentElement.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Ce(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Ce(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',Te(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let c of t.children)Ce(c,l,i)}else Te(t,r,t.class)}function Te(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else{let r=e.appendChild(document.createElement("span"));r.innerHTML='',r.appendChild(document.createElement("span")).textContent=t.text}}var ee=document.documentElement.dataset.base;ee.endsWith("/")||(ee+="/");function Qe(){document.querySelector(".tsd-full-hierarchy")?Xe():document.querySelector(".tsd-hierarchy")&&Ye()}function Xe(){document.addEventListener("click",r=>{let i=r.target;for(;i.parentElement&&i.parentElement.tagName!="LI";)i=i.parentElement;i.dataset.dropdown&&(i.dataset.dropdown=String(i.dataset.dropdown!=="true"))});let t=new Map,e=new Set;for(let r of document.querySelectorAll(".tsd-full-hierarchy [data-refl]")){let i=r.querySelector("ul");t.has(r.dataset.refl)?e.add(r.dataset.refl):i&&t.set(r.dataset.refl,i)}for(let r of e)n(r);function n(r){let i=t.get(r).cloneNode(!0);i.querySelectorAll("[id]").forEach(s=>{s.removeAttribute("id")}),i.querySelectorAll("[data-dropdown]").forEach(s=>{s.dataset.dropdown="false"});for(let s of document.querySelectorAll(`[data-refl="${r}"]`)){let o=et(),a=s.querySelector("ul");s.insertBefore(o,a),o.dataset.dropdown=String(!!a),a||s.appendChild(i.cloneNode(!0))}}}function Ye(){let t=document.getElementById("tsd-hierarchy-script");t&&(t.addEventListener("load",Ie),Ie())}async function Ie(){let t=document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");if(!t||!window.hierarchyData)return;let n=await(await fetch(window.hierarchyData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=+t.dataset.refl,s=await new Response(r).json(),o=t.querySelector("ul"),a=document.createElement("ul");if(a.classList.add("tsd-hierarchy"),Ze(a,s,i),o.querySelectorAll("li").length==a.querySelectorAll("li").length)return;let l=document.createElement("span");l.classList.add("tsd-hierarchy-toggle"),l.textContent=window.translations.hierarchy_expand,t.querySelector("h4 a")?.insertAdjacentElement("afterend",l),l.insertAdjacentText("beforebegin",", "),l.addEventListener("click",()=>{l.textContent===window.translations.hierarchy_expand?(o.insertAdjacentElement("afterend",a),o.remove(),l.textContent=window.translations.hierarchy_collapse):(a.insertAdjacentElement("afterend",o),a.remove(),l.textContent=window.translations.hierarchy_expand)})}function Ze(t,e,n){let r=e.roots.filter(i=>Ke(e,i,n));for(let i of r)t.appendChild(Pe(e,i,n))}function Pe(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let i=t.reflections[e],s=document.createElement("li");if(s.classList.add("tsd-hierarchy-item"),e===n){let o=s.appendChild(document.createElement("span"));o.textContent=i.name,o.classList.add("tsd-hierarchy-target")}else{for(let a of i.uniqueNameParents||[]){let l=t.reflections[a],c=s.appendChild(document.createElement("a"));c.textContent=l.name,c.href=ee+l.url,c.className=l.class+" tsd-signature-type",s.append(document.createTextNode("."))}let o=s.appendChild(document.createElement("a"));o.textContent=t.reflections[e].name,o.href=ee+i.url,o.className=i.class+" tsd-signature-type"}if(i.children){let o=s.appendChild(document.createElement("ul"));o.classList.add("tsd-hierarchy");for(let a of i.children){let l=Pe(t,a,n,r);l&&o.appendChild(l)}}return r.delete(e),s}function Ke(t,e,n){if(e===n)return!0;let r=new Set,i=[t.reflections[e]];for(;i.length;){let s=i.pop();if(!r.has(s)){r.add(s);for(let o of s.children||[]){if(o===n)return!0;i.push(t.reflections[o])}}}return!1}function et(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.innerHTML='',t}J(X,"a[data-toggle]");J(Z,".tsd-accordion");J(Y,".tsd-filter-item input[type=checkbox]");var Oe=document.getElementById("tsd-theme");Oe&&be(Oe);var tt=new U;Object.defineProperty(window,"app",{value:tt});ge();ke();Qe();})(); +"use strict";(()=>{var De=Object.create;var le=Object.defineProperty;var Fe=Object.getOwnPropertyDescriptor;var Ne=Object.getOwnPropertyNames;var Ve=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var qe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var je=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ne(e))!Be.call(t,i)&&i!==n&&le(t,i,{get:()=>e[i],enumerable:!(r=Fe(e,i))||r.enumerable});return t};var $e=(t,e,n)=>(n=t!=null?De(Ve(t)):{},je(e||!t||!t.__esModule?le(n,"default",{value:t,enumerable:!0}):n,t));var pe=qe((de,he)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,c],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[c+1]*i[d+1],c+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new t.TokenSet;s.node.edges["*"]=c}s.str.length==1&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof de=="object"?he.exports=n():e.lunr=n()}(this,function(){return t})})()});window.translations||={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse"};var ce=[];function G(t,e){ce.push({selector:e,constructor:t})}var J=class{alwaysVisibleMember=null;constructor(){this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){ce.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!ze(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function ze(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var ue=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var ge=$e(pe(),1);async function H(t){let e=Uint8Array.from(atob(t),s=>s.charCodeAt(0)),r=new Blob([e]).stream().pipeThrough(new DecompressionStream("deflate")),i=await new Response(r).text();return JSON.parse(i)}async function fe(t,e){if(!window.searchData)return;let n=await H(window.searchData);t.data=n,t.index=ge.Index.load(n.index),e.classList.remove("loading"),e.classList.add("ready")}function ve(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:document.documentElement.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{fe(e,t)}),fe(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{re(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),We(t,i,r,e)}function We(t,e,n,r){n.addEventListener("input",ue(()=>{Ue(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Je(e,t):i.key=="ArrowUp"?(me(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(me(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),re(t))})}function re(t){t.classList.remove("has-focus")}function Ue(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ye(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ye(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=c+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function me(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Je(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),re(e)}}function ye(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ne(t.substring(s,o)),`${ne(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ne(t.substring(s))),i.join("")}var Ge={"&":"&","<":"<",">":">","'":"'",'"':"""};function ne(t){return t.replace(/[&<>"'"]/g,e=>Ge[e])}var I=class{el;app;constructor(e){this.el=e.el,this.app=e.app}};var A="mousedown",Ee="mousemove",B="mouseup",X={x:0,y:0},xe=!1,ie=!1,Xe=!1,D=!1,Le=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Le?"is-mobile":"not-mobile");Le&&"ontouchstart"in document.documentElement&&(Xe=!0,A="touchstart",Ee="touchmove",B="touchend");document.addEventListener(A,t=>{ie=!0,D=!1;let e=A=="touchstart"?t.targetTouches[0]:t;X.y=e.pageY||0,X.x=e.pageX||0});document.addEventListener(Ee,t=>{if(ie&&!D){let e=A=="touchstart"?t.targetTouches[0]:t,n=X.x-(e.pageX||0),r=X.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ie=!1});document.addEventListener("click",t=>{xe&&(t.preventDefault(),t.stopImmediatePropagation(),xe=!1)});var Y=class extends I{active;className;constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(A,n=>this.onDocumentPointerDown(n)),document.addEventListener(B,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var se;try{se=localStorage}catch{se={getItem(){return null},setItem(){}}}var C=se;var be=document.head.appendChild(document.createElement("style"));be.dataset.for="filters";var Z=class extends I{key;value;constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),be.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=C.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){C.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var oe=new Map,ae=class{open;accordions=[];key;constructor(e,n){this.key=e,this.open=n}add(e){this.accordions.push(e),e.open=this.open,e.addEventListener("toggle",()=>{this.toggle(e.open)})}toggle(e){for(let n of this.accordions)n.open=e;C.setItem(this.key,e.toString())}},K=class extends I{constructor(e){super(e);let n=this.el.querySelector("summary"),r=n.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)});let i=`tsd-accordion-${n.dataset.key??n.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`,s;if(oe.has(i))s=oe.get(i);else{let o=C.getItem(i),a=o?o==="true":this.el.open;s=new ae(i,a),oe.set(i,s)}s.add(this.el)}};function Se(t){let e=C.getItem("tsd-theme")||"os";t.value=e,we(e),t.addEventListener("change",()=>{C.setItem("tsd-theme",t.value),we(t.value)})}function we(t){document.documentElement.dataset.theme=t}var ee;function Ce(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Te),Te())}async function Te(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let e=await H(window.navigationData);ee=document.documentElement.dataset.base,ee.endsWith("/")||(ee+="/"),t.innerHTML="";for(let n of e)Ie(n,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Ie(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',ke(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let c of t.children)Ie(c,l,i)}else ke(t,r,t.class)}function ke(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=ee+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else{let r=e.appendChild(document.createElement("span"));r.innerHTML='',r.appendChild(document.createElement("span")).textContent=t.text}}var te=document.documentElement.dataset.base;te.endsWith("/")||(te+="/");function Pe(){document.querySelector(".tsd-full-hierarchy")?Ye():document.querySelector(".tsd-hierarchy")&&Ze()}function Ye(){document.addEventListener("click",r=>{let i=r.target;for(;i.parentElement&&i.parentElement.tagName!="LI";)i=i.parentElement;i.dataset.dropdown&&(i.dataset.dropdown=String(i.dataset.dropdown!=="true"))});let t=new Map,e=new Set;for(let r of document.querySelectorAll(".tsd-full-hierarchy [data-refl]")){let i=r.querySelector("ul");t.has(r.dataset.refl)?e.add(r.dataset.refl):i&&t.set(r.dataset.refl,i)}for(let r of e)n(r);function n(r){let i=t.get(r).cloneNode(!0);i.querySelectorAll("[id]").forEach(s=>{s.removeAttribute("id")}),i.querySelectorAll("[data-dropdown]").forEach(s=>{s.dataset.dropdown="false"});for(let s of document.querySelectorAll(`[data-refl="${r}"]`)){let o=tt(),a=s.querySelector("ul");s.insertBefore(o,a),o.dataset.dropdown=String(!!a),a||s.appendChild(i.cloneNode(!0))}}}function Ze(){let t=document.getElementById("tsd-hierarchy-script");t&&(t.addEventListener("load",Qe),Qe())}async function Qe(){let t=document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");if(!t||!window.hierarchyData)return;let e=+t.dataset.refl,n=await H(window.hierarchyData),r=t.querySelector("ul"),i=document.createElement("ul");if(i.classList.add("tsd-hierarchy"),Ke(i,n,e),r.querySelectorAll("li").length==i.querySelectorAll("li").length)return;let s=document.createElement("span");s.classList.add("tsd-hierarchy-toggle"),s.textContent=window.translations.hierarchy_expand,t.querySelector("h4 a")?.insertAdjacentElement("afterend",s),s.insertAdjacentText("beforebegin",", "),s.addEventListener("click",()=>{s.textContent===window.translations.hierarchy_expand?(r.insertAdjacentElement("afterend",i),r.remove(),s.textContent=window.translations.hierarchy_collapse):(i.insertAdjacentElement("afterend",r),i.remove(),s.textContent=window.translations.hierarchy_expand)})}function Ke(t,e,n){let r=e.roots.filter(i=>et(e,i,n));for(let i of r)t.appendChild(Oe(e,i,n))}function Oe(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let i=t.reflections[e],s=document.createElement("li");if(s.classList.add("tsd-hierarchy-item"),e===n){let o=s.appendChild(document.createElement("span"));o.textContent=i.name,o.classList.add("tsd-hierarchy-target")}else{for(let a of i.uniqueNameParents||[]){let l=t.reflections[a],c=s.appendChild(document.createElement("a"));c.textContent=l.name,c.href=te+l.url,c.className=l.class+" tsd-signature-type",s.append(document.createTextNode("."))}let o=s.appendChild(document.createElement("a"));o.textContent=t.reflections[e].name,o.href=te+i.url,o.className=i.class+" tsd-signature-type"}if(i.children){let o=s.appendChild(document.createElement("ul"));o.classList.add("tsd-hierarchy");for(let a of i.children){let l=Oe(t,a,n,r);l&&o.appendChild(l)}}return r.delete(e),s}function et(t,e,n){if(e===n)return!0;let r=new Set,i=[t.reflections[e]];for(;i.length;){let s=i.pop();if(!r.has(s)){r.add(s);for(let o of s.children||[]){if(o===n)return!0;i.push(t.reflections[o])}}}return!1}function tt(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.innerHTML='',t}G(Y,"a[data-toggle]");G(K,".tsd-accordion");G(Z,".tsd-filter-item input[type=checkbox]");var _e=document.getElementById("tsd-theme");_e&&Se(_e);var nt=new J;Object.defineProperty(window,"app",{value:nt});ve();Ce();Pe();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/assets/navigation.js b/assets/navigation.js index 60e6fa3..95f79c6 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA42Vy27DIBBF/4W12zROk7beZZFFFqmlVlUXUVRRm8jIGCPAbaIq/145DwKYR7a+cw9cMTNe/wGJdhJkANMS7UACGJQVyEDTlh1BYnT8fF/JhoAE1JiWIEsTUFSYlBxRkK0VIGcSt/RKKAgUQhFOqgkap8+HRPnfkOiI9PlPaty/grKoEL9iMJWIb2Fhkc51VrLpTAMuuIaRe6YIC277Hl6extNU8762FLnNvRJz57Xbm9cx53vbeM7tlZj7g/5yyLy5lXwbx5fiot5IsdrKQXK0VuxFfiDH8JsYr3I3NhmT1NcM244W/ZlaQ9jm2aNm3mIiEV9B5keokiCGCxlCcCFj9qU55k7GcjjzQ1AkzakiACEwlKVXI+ZIElUSwQRznAsCiAayzwoT5GdcKgIQfVJse14HW4ujsitQ5ApaUQBl7g6b0auOm2w0ADvuVDGCnMP98Fdylr+O8k2/lLkJ0la5yZo7iMYqt0DX6XdwHGtgc9j8A+86as0pBwAA" \ No newline at end of file +window.navigationData = "eJyNlctuwyAQRf+Ftds0TpO23mWRRRappVZVF1FUUZvIyBgjwG2iKv9eOQ8CmEe2vnMPXDEzXv8BiXYSZADTEu1AAhiUFchA05YdQWJ0/HxfyYaABNSYliBLE1BUmJQcUZCtFSBnErf0SigIFEIRTqoJGqfPh0T535DoiPT5T2rcv4KyqBC/YjCViG9hYZHOdVay6UwDLriGkXumCAtu+x5ensbTVPO+thS5zb0Sc+e125vXMed723jO7ZWY+4P+csi8uZV8G8eX4qLeSLHaykFytFbsRX4gx/CbGK9yNzYZk9TXDNuOFv2ZWkPY5tmjZt5iIhFfQeZHqJIghgsZQnAhY/alOeZOxnI480NQJM2pIgAhMJSlVyPmSBJVEsEEc5wLAogGss8KE+RnXCoCEH1SbHteB1uLo7IrUOQKWlEAZe4Om9GrjptsNAA77lQxgpzD/fBXcpa/jvJNv5S5CdJWucmaO4jGKrdA1+l3cBxrYHPY/AOjkmdk" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index cc198e2..e763981 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA72cS3PbOBLHvwtzZRzhDfk2hxz2MJuqze7OQeVKcWxmzdKzSDmPdfm7b4GkxG42QLXE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wROPnP5aHnjhYNYY3hgP99+AGwPc8N756TuiYM6BIRY8+Lr7jKAfABnDmwfn24PACyDYGK6X/rvKgxsw8R3TyeneKegLGBTDHZTuyuDgxIMZ0BmJPhOZHmXD7WH3JWLw0gCDggvh+eu6wA94c4I3r4ZrDyDbguFSfYyOB2T3x1SQNwDTnjc8wQVNY2CKeR5Nwc84iwGaPG8hGnmQoB+yXyAtb46cLugBLGES4+WNbXH43t0bAFEBejzvrfd3eUBcYM1Son/lvC6NMxDMYp2J6jO04gGAs5EC/nTfM907tP2nO20BeEtA971IEDyQkDzOh687AjfgdUpmqCTfAb54WOFQBAhFnEaJl1FoQAIEJE67LV76HP3bE+ATuGR56i7CUOiBI88bKbouKJDTNS+rdE62p29zAV9gvdO8ER8vA9BDP2NOn7zODbfmQL9AdlD9QuWY7oY7voBy0EvZT3DL9YdQUCDnaF42Hr7EAkYNBGh4A3+6gwuiAiuD7Jd3y8sm4OYpiA3O4/5g4njAo1ulIEy4E+JleXJLFHgD5Dve9Omv9eLkDDYc6prhookPHr6ucYQGCRDVD7rsPy0PMHx3GfQOjJda9O+TC1v7DxqALwCs5DHxY5TlAQuCN+yjPggQj+ANzfmfWgAvYLwlYzQe8uxQHcpNtSuz+9XD29v/AHqUHEI="; \ No newline at end of file diff --git a/assets/style.css b/assets/style.css index 499bc28..7f80f3d 100644 --- a/assets/style.css +++ b/assets/style.css @@ -29,9 +29,9 @@ --light-color-ts-function: #572be7; --light-color-ts-class: #1f70c2; --light-color-ts-interface: #108024; - --light-color-ts-constructor: #4d7fff; - --light-color-ts-property: #ff984d; - --light-color-ts-method: #ff4db8; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: #9f5f30; + --light-color-ts-method: #be3989; --light-color-ts-reference: #ff4d82; --light-color-ts-call-signature: var(--light-color-ts-method); --light-color-ts-index-signature: var(--light-color-ts-property); @@ -41,7 +41,7 @@ --light-color-ts-parameter: var(--light-color-ts-variable); /* type literal not included as links will never be generated to it */ --light-color-ts-type-parameter: #a55c0e; - --light-color-ts-accessor: #ff4d4d; + --light-color-ts-accessor: #c73c3c; --light-color-ts-get-signature: var(--light-color-ts-accessor); --light-color-ts-set-signature: var(--light-color-ts-accessor); --light-color-ts-type-alias: #d51270; @@ -86,7 +86,7 @@ --dark-color-ts-function: #a280ff; --dark-color-ts-class: #8ac4ff; --dark-color-ts-interface: #6cff87; - --dark-color-ts-constructor: #4d7fff; + --dark-color-ts-constructor: var(--dark-color-ts-class); --dark-color-ts-property: #ff984d; --dark-color-ts-method: #ff4db8; --dark-color-ts-reference: #ff4d82; @@ -96,7 +96,7 @@ --dark-color-ts-parameter: var(--dark-color-ts-variable); /* type literal not included as links will never be generated to it */ --dark-color-ts-type-parameter: #e07d13; - --dark-color-ts-accessor: #ff4d4d; + --dark-color-ts-accessor: #ff6060; --dark-color-ts-get-signature: var(--dark-color-ts-accessor); --dark-color-ts-set-signature: var(--dark-color-ts-accessor); --dark-color-ts-type-alias: #ff6492; diff --git a/classes/index.Option.html b/classes/index.Option.html index a3a4eea..52a56dc 100644 --- a/classes/index.Option.html +++ b/classes/index.Option.html @@ -1,6 +1,6 @@ Option | @wopjs/tsur - v0.1.6

Class Option<T>

The Option type is an immutable representation of an optional value: every Option is either Some and contains a value, or None and does not.

-

Type Parameters

  • T = any

Properties

Type Parameters

  • T = any

Properties

Methods

[iterator] and andThen @@ -31,99 +31,99 @@ Some unwrapOr

Properties

None: None = ...

The None value.

-

Methods

  • Returns an iterator over the possibly contained value.

    +

Methods

  • Returns an iterator over the possibly contained value.

    The iterator yields one value if the result is Some, otherwise none.

    -

    Returns Generator<T, void, unknown>

  • Type Parameters

    • B

    Parameters

    Returns Option<B>

    None if the Option is None, otherwise returns optionB.

    Arguments passed to and are eagerly evaluated; if you are passing the result of a function call, it is recommended to use andThen, which is lazily evaluated.

    -
  • Type Parameters

    • B

    Parameters

    • getOptionB: (value: T) => Option<B>

      A function that returns an Option

    • OptionalthisArg: any

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

    Returns Option<B>

    None if the Option is None, otherwise calls getOptionB with the wrapped value and returns the result.

    -
  • Returns None if the Option is None, otherwise calls predicate with the wrapped value and returns:

    +
  • Returns None if the Option is None, otherwise calls predicate with the wrapped value and returns:

    • Some(t) if predicate returns true (where t is the wrapped value with inferred new type), and
    • None if predicate returns false.

    Type Parameters

    • U

    Parameters

    • predicate: (value: T) => value is U

      A type predicate function that defines type guard by returning true or false.

    • OptionalthisArg: any

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      -

    Returns Option<U>

  • Returns None if the Option is None, otherwise calls predicate with the wrapped value and returns:

    +

Returns Option<U>

  • Returns None if the Option is None, otherwise calls predicate with the wrapped value and returns:

    • Some(t) if predicate returns true (where t is the wrapped value), and
    • None if predicate returns false.

    Parameters

    • predicate: (value: T) => boolean

      A function that returns true or false.

    • OptionalthisArg: any

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      -

    Returns Option<T>

    • Returns boolean

      true if the Option is a None.

      -
    • Whether this value is the same as the other Option.

      +

    Returns Option<T>

    • Returns boolean

      true if the Option is a None.

      +
    • Whether this value is the same as the other Option.

      Parameters

      • other: unknown

        Another Option or any value

      Returns boolean

      true if the other is an Option and the value are the same as this value via Object.is.

      -
    • Returns boolean

      true if the Option is a Some.

      -
    • Parameters

      • predicate: (value: T) => boolean

        A function that returns true if the value satisfies the predicate, otherwise false

        +
    • Returns boolean

      true if the Option is a Some.

      +
    • Parameters

      • predicate: (value: T) => boolean

        A function that returns true if the value satisfies the predicate, otherwise false

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns boolean

      true if the Option is a Some and and the value inside of it matches a predicate.

      -
    • Maps an Option<T> to Option<U> by applying a function to a contained value (if Some) or returns None (if None).

      +
    • Maps an Option<T> to Option<U> by applying a function to a contained value (if Some) or returns None (if None).

      Type Parameters

      • U

      Parameters

      • fn: (value: T) => U

        A function that maps a value to another value

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<U>

      None if the Option is None, otherwise returns Some(fn(value)).

      -
    • Extract the value from an Option in a way that handles both the Some and None cases.

      +
    • Extract the value from an Option in a way that handles both the Some and None cases.

      Type Parameters

      • U

      Parameters

      • Some: (value: T) => U

        A function that returns a value if the Option is a Some.

      • None: () => U

        A function that returns a value if the Option is a None.

      Returns U

      The value returned by the provided function.

      -
    • Transforms the Option<T> into a Result<T, E>, mapping Some(v) to Ok(v) and None to Err(err).

      +
    • Transforms the Option<T> into a Result<T, E>, mapping Some(v) to Ok(v) and None to Err(err).

      Arguments passed to okOr are eagerly evaluated; if you are passing the result of a function call, it is recommended to use okOrElse, which is lazily evaluated.

      Type Parameters

      • E

      Parameters

      • error: E

        The error value for Err if the Option is None.

        -

      Returns Result<T, E>

    • Transforms the Option<T> into a Result<T, E>, mapping Some(v) to Ok(v) and None to Err(err()).

      +

    Returns Result<T, E>

    • Transforms the Option<T> into a Result<T, E>, mapping Some(v) to Ok(v) and None to Err(err()).

      Type Parameters

      • E

      Parameters

      • error: () => E

        A function that returns the error value for Err if the Option is None.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        -

      Returns Result<T, E>

    • Type Parameters

      • B

      Parameters

      Returns Option<T | B>

      the Option if it contains a value, otherwise returns optionB.

      Arguments passed to or are eagerly evaluated; if you are passing the result of a function call, it is recommended to use orElse, which is lazily evaluated.

      -
    • Type Parameters

      • B

      Parameters

      • getOptionB: () => Option<B>

        A function that returns an Option

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<T | B>

      the Option if it contains a value, otherwise calls getOptionB and returns the result.

      -
    • Parameters

      • message: string = "called `Option.unwrap()` on a `None` value"

        Optional Error message

      Returns T

      the contained Some value.

      if the value is a None.

      -
    • Returns undefined | T

      the contained Some value or undefined otherwise.

      +
    • Returns undefined | T

      the contained Some value or undefined otherwise.

      Arguments passed to unwrapOr are eagerly evaluated; if you are passing the result of a function call, it is recommended to use unwrapOrElse, which is lazily evaluated.

      -
    • Type Parameters

      • U

      Parameters

      • defaultValue: U

        default value

        +
      • Type Parameters

        • U

        Parameters

        • defaultValue: U

          default value

        Returns T | U

        the contained Some value or a provided default.

        Arguments passed to unwrapOr are eagerly evaluated; if you are passing the result of a function call, it is recommended to use unwrapOrElse, which is lazily evaluated.

        -
    • Type Parameters

      • U

      Parameters

    • Type Parameters

      • U

      Parameters

      • fn: () => U

        A function that computes a default value.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns T | U

      the contained Some value or computes it from a closure.

      -
    • Unzips an Option containing a tuple of two Options.

      +
    • Unzips an Option containing a tuple of two Options.

      Returns [
          Option<T extends any[] ? T<T>[0] : unknown>,
          Option<T extends any[] ? T<T>[1] : unknown>,
      ]

      [Some(a), Some(b)] if this is Some([a, b]), otherwise [None, None].

      -
    • Zips this and another Option with function fn.

      +
    • Zips this and another Option with function fn.

      Type Parameters

      • B
      • U

      Parameters

      • optionB: Option<B>
      • fn: (valueA: T, valueB: B) => U
      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<U>

      Some(fn(a, b)) if this is Some(a) and other is Some(b), otherwise None.

      -
    • Wrap a value in an Option if the value is truthy.

      Type Parameters

      • T

      Parameters

      • value: T

        A value of type T

        -

      Returns Option<Exclude<T, Falsy>>

    • Wrap a value in an Option if the value satisfies the predicate.

      +

    Returns Option<Exclude<T, Falsy>>

  • Wrap a value in an Option if the value satisfies the predicate.

    Type Parameters

    Parameters

    • source: TSource

      Source value

    • predicate: (source: TSource) => source is T

      A function that returns true if the value satisfies the predicate, otherwise false

    • OptionalthisArg: any

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      -

    Returns Option<T>

  • Wrap a value in an Option if the value satisfies the predicate.

    +
  • Returns Option<T>

  • Wrap a value in an Option if the value satisfies the predicate.

    Type Parameters

    Parameters

    • source: TSource

      Source value

    • predicate: (source: TSource) => boolean

      A function that returns true if the value satisfies the predicate, otherwise false

      -
    • OptionalthisArg: any

    Returns Option<T>

    • Type Parameters

      • T

      Parameters

      • maybeOption: unknown

        A value that might be an Option

        +
      • OptionalthisArg: any

      Returns Option<T>

    • Type Parameters

      • T

      Parameters

      • maybeOption: unknown

        A value that might be an Option

      Returns maybeOption is Option<T>

      true if the given value is an Option.

      -
    • Parameters

    • Parameters

      • a: unknown

        An Option or any value

      • b: unknown

        An Option or any value

      Returns boolean

      true if the both are Option and the value are the same via Object.is.

      -
    • Type Parameters

      • T = any

      Parameters

      • value: T

        A value of type T

      Returns Option<T>

      Wrap a value into an Option.

      -
    • Type Parameters

      • T

      Parameters

    • Type Parameters

      • T

      Parameters

      • valueOrOption: T | Option<T>

        A value of type T or an Option<T>

      Returns undefined | T

      the unwrapOr() result if the value is an Option, otherwise the value itself.

      -
    +
    diff --git a/classes/index.Result.html b/classes/index.Result.html index 138f990..f9056d8 100644 --- a/classes/index.Result.html +++ b/classes/index.Result.html @@ -1,5 +1,5 @@ Result | @wopjs/tsur - v0.1.6

    Class Result<T, E>

    The Result type is an immutable representation of either success (Ok) or failure (Err).

    -

    Type Parameters

    • T = any
    • E = any

    Methods

    Type Parameters

    • T = any
    • E = any

    Methods

    [iterator] and andThen err @@ -32,87 +32,87 @@ tryAsync

    Methods

    • Returns an iterator over the possibly contained value.

      The iterator yields one value if the result is Ok, otherwise none.

      -

      Returns Generator<T, void, unknown>

    • Type Parameters

      • BT
      • BE = any

      Parameters

    • Type Parameters

      • BT
      • BE = any

      Parameters

      • getResultB: (value: T) => Result<BT, BE>

        A function that returns a Result

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Result<BT, E | BE>

      Err if the Result is Err, otherwise calls getOptionB with the wrapped value and returns the result.

      -
    • Returns boolean

      true if the Result is an Err.

      -
    • Parameters

      • predicate: (error: E) => boolean
      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        +
    • Returns boolean

      true if the Result is an Err.

      +
    • Parameters

      • predicate: (error: E) => boolean
      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns boolean

      true if the Result is an Err and and the error inside of it matches a predicate.

      -
    • Returns boolean

      true if the Result is an Ok.

      -
    • Parameters

      • predicate: (value: T) => boolean
      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        +
    • Returns boolean

      true if the Result is an Ok.

      +
    • Parameters

      • predicate: (value: T) => boolean
      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns boolean

      true if the Result is an Ok and and the value inside of it matches a predicate.

      -
    • Whether this Ok value or Err error is the same as the other Result.

      +
    • Whether this Ok value or Err error is the same as the other Result.

      Parameters

      • other: unknown

        Another Result or any value

      Returns boolean

      true if the other is an Result and the Ok value or Err error is the same as this via Object.is.

      -
    • Maps an Result<T, E> to Result<U, E> by applying a function to a contained Ok value, leaving an Err value untouched.

      +
    • Maps an Result<T, E> to Result<U, E> by applying a function to a contained Ok value, leaving an Err value untouched.

      Type Parameters

      • U

      Parameters

      • fn: (value: T) => U

        A function that maps a value to another value

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Result<U, E>

      Err if the Result is Err, otherwise returns Ok(fn(value)).

      -
    • Maps a Result<T, E> to Result<T, F> by applying a function to a contained Err value, leaving an Ok value untouched.

      +
    • Maps a Result<T, E> to Result<T, F> by applying a function to a contained Err value, leaving an Ok value untouched.

      This function can be used to pass through a successful result while handling an error.

      Type Parameters

      • U

      Parameters

      • fn: (error: E) => U

        A function that maps a error to another error

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Result<T, U>

      Ok if the Result is Ok, otherwise returns Err(fn(error)).

      -
    • Extract the value from an Result in a way that handles both the Ok and Err cases.

      +
    • Extract the value from an Result in a way that handles both the Ok and Err cases.

      Type Parameters

      • U

      Parameters

      • Ok: (value: T) => U

        A function that returns a value if the Result is a Ok.

      • Err: (error: E) => U

        A function that returns a value if the Result is a Err.

      Returns U

      The value returned by the provided function.

      -
    • Type Parameters

      • BT
      • BE = any

      Parameters

      Returns Result<T | BT, E | BE>

      the Result if it is Ok, otherwise returns resultB.

      Arguments passed to or are eagerly evaluated; if you are passing the result of a function call, it is recommended to use orElse, which is lazily evaluated.

      -
    • Type Parameters

      • BT
      • BE = any

      Parameters

      • getResultB: () => Result<BT, BE>

        A function that returns an Result

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Result<T | BT, E | BE>

      the Result if it contains a value, otherwise calls getResultB and returns the result.

      -
    • Parameters

      • message: string = "called `Result.unwrap()` on an `Err`"

        Optional Error message

      Returns T

      the contained Ok value.

      if the value is an Err.

      -
    • Parameters

      • message: string = "called `Result.unwrapErr()` on an `Ok` value"

        Optional Error message

        +
    • Parameters

      • message: string = "called `Result.unwrapErr()` on an `Ok` value"

        Optional Error message

      Returns E

      the contained Err error.

      if the error is an Ok.

      -
    • Returns undefined | E

      the contained Err error or undefined otherwise.

      +
    • Returns undefined | E

      the contained Err error or undefined otherwise.

      Arguments passed to unwrapErrOr are eagerly evaluated; if you are passing the result of a function call, it is recommended to use unwrapErrOrElse, which is lazily evaluated.

      -
    • Type Parameters

      • U

      Parameters

      • defaultError: U

        default error

        +
      • Type Parameters

        • U

        Parameters

        • defaultError: U

          default error

        Returns E | U

        the contained Err error or a provided default.

        Arguments passed to unwrapErrOr are eagerly evaluated; if you are passing the result of a function call, it is recommended to use unwrapErrOrElse, which is lazily evaluated.

        -
    • Type Parameters

      • U

      Parameters

    • Type Parameters

      • U

      Parameters

      • fn: () => U

        A function that computes a default value.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns E | U

      the contained Err error or computes it from a closure.

      -
    • Returns undefined | T

      the contained Ok value or undefined otherwise.

      -
    • Type Parameters

      • U

      Parameters

    • Returns undefined | T

      the contained Ok value or undefined otherwise.

      +
    • Type Parameters

      • U

      Parameters

      • defaultValue: U

        default value

      Returns T | U

      the contained Ok value or a provided default.

      Arguments passed to unwrapOr are eagerly evaluated; if you are passing the result of a function call, it is recommended to use unwrapOrElse, which is lazily evaluated.

      -
    • Type Parameters

      • U

      Parameters

    • Type Parameters

      • U

      Parameters

      • fn: () => U

        A function that computes a default value.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns T | U

      the contained Ok value or computes it from a closure.

      -
    • Err if the value is an Error.

      -

      Type Parameters

      • T = any
      • E extends Error = Error

      Parameters

      • source: T | E

      Returns Result<T, E>

    • OK if the value satisfies the predicate, otherwise Err

      +
    • Err if the value is an Error.

      +

      Type Parameters

      • T = any
      • E extends Error = Error

      Parameters

      • source: T | E

      Returns Result<T, E>

    • OK if the value satisfies the predicate, otherwise Err

      Type Parameters

      • T = any
      • E = any

      Parameters

      • source: T | E

        Source value

      • predicate: (source: T | E) => source is T

        A function that returns true if the value satisfies the predicate, otherwise false

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        -

      Returns Result<T, E>

    • OK if the value satisfies the predicate, otherwise Err

      +

    Returns Result<T, E>

  • OK if the value satisfies the predicate, otherwise Err

    Type Parameters

    • T = any
    • E = any

    Parameters

    • source: T | E

      Source value

    • predicate: (source: T | E) => boolean

      A function that returns true if the value satisfies the predicate, otherwise false

    • OptionalthisArg: any

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      -

    Returns Result<T, E>

    • Type Parameters

      • T
      • E

      Parameters

      • maybeResult: unknown

        A value that might be an Result

        +

      Returns Result<T, E>

    • Type Parameters

      • T
      • E

      Parameters

      • maybeResult: unknown

        A value that might be an Result

      Returns maybeResult is Result<T, E>

      true if the given value is an Result.

      -
    • Parameters

    • Parameters

      • a: unknown

        An Result or any value

      • b: unknown

        An Result or any value

      Returns boolean

      true if the both are Result and the Ok value or Err error are the same via Object.is.

      -
    • Ok if the fn returns a value, Err if the fn throws.

      +
    • Ok if the fn returns a value, Err if the fn throws.

      Type Parameters

      • T = any
      • E = any
      • TArgs extends any[] = []

      Parameters

      Returns Result<T, E>

      Ok with the returned value or Err with the exception error.

      -
    • Ok if the fn returned Promise resolves a value, Err if the fn throws or the Promise rejected.

      +
    • Ok if the fn returned Promise resolves a value, Err if the fn throws or the Promise rejected.

      Type Parameters

      • T = any
      • E = any
      • TArgs extends any[] = []

      Parameters

      Returns Promise<Result<Awaited<T>, E>>

      Ok with the resolved value or Err with the exception error or the rejected value.

      -
    +
    diff --git a/functions/index.Err-1.html b/functions/index.Err-1.html index 0813dc1..116ea2a 100644 --- a/functions/index.Err-1.html +++ b/functions/index.Err-1.html @@ -2,4 +2,4 @@

    Wrap an error into an Result.

    +
    diff --git a/functions/index.Ok-1.html b/functions/index.Ok-1.html index b48dd61..74d4cdd 100644 --- a/functions/index.Ok-1.html +++ b/functions/index.Ok-1.html @@ -2,4 +2,4 @@

    Wrap a value into an Result.

    +
    diff --git a/functions/index.Some-1.html b/functions/index.Some-1.html index 8dc2b8d..95d2558 100644 --- a/functions/index.Some-1.html +++ b/functions/index.Some-1.html @@ -2,4 +2,4 @@

    Wrap a value into an Option.

    +
    diff --git a/functions/index.filterMap.html b/functions/index.filterMap.html index b7ac378..dc37742 100644 --- a/functions/index.filterMap.html +++ b/functions/index.filterMap.html @@ -4,4 +4,4 @@
  • fn: (value: T, index: number, array: T[]) => Option<U>

    A function that produces an Option.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

  • Returns U[]

    An array of filtered and mapped values.

    -
    +
    diff --git a/functions/index.first.html b/functions/index.first.html index 0e96c50..414cd8f 100644 --- a/functions/index.first.html +++ b/functions/index.first.html @@ -3,4 +3,4 @@
  • predicate: (value: T, index: number, array: T[]) => boolean = truePredicate

    A predicate function.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, the first element is returned.

  • Returns Option<T>

    The first item that matches the predicate, or None if no item matches.

    -
    +
    diff --git a/functions/index.firstIndex.html b/functions/index.firstIndex.html index ccdca34..6dce714 100644 --- a/functions/index.firstIndex.html +++ b/functions/index.firstIndex.html @@ -3,4 +3,4 @@
  • predicate: (value: T, index: number, array: T[]) => boolean

    A predicate function.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

  • Returns Option<number>

    The index of the first item that matches the predicate, or None if no item matches.

    -
    +
    diff --git a/functions/index.firstMap.html b/functions/index.firstMap.html index 7e42433..2ab64c5 100644 --- a/functions/index.firstMap.html +++ b/functions/index.firstMap.html @@ -4,4 +4,4 @@
  • fn: (value: T, index: number, array: T[]) => Option<U>

    A function that produces an Option.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

  • Returns Option<U>

    The first non-none result.

    -
    +
    diff --git a/functions/index.last.html b/functions/index.last.html index 531e787..80b6d66 100644 --- a/functions/index.last.html +++ b/functions/index.last.html @@ -3,4 +3,4 @@
  • predicate: (value: T, index: number, array: T[]) => boolean = truePredicate

    A predicate function.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, the last element is returned.

  • Returns Option<T>

    The last item that matches the predicate, or None if no item matches.

    -
    +
    diff --git a/functions/index.lastIndex.html b/functions/index.lastIndex.html index 48ad73a..b9022c8 100644 --- a/functions/index.lastIndex.html +++ b/functions/index.lastIndex.html @@ -3,4 +3,4 @@
  • predicate: (value: T, index: number, array: T[]) => boolean

    lastIndex calls predicate once for each element of the array, in backward order, until it finds one where predicate returns true.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

  • Returns Option<number>

    The index of the last item that matches the predicate, or None if no item matches.

    -
    +
    diff --git a/functions/index.lastMap.html b/functions/index.lastMap.html index 8f10a24..a4d0d33 100644 --- a/functions/index.lastMap.html +++ b/functions/index.lastMap.html @@ -3,4 +3,4 @@
  • fn: (value: T, index: number, array: T[]) => Option<U>

    A function that produces an Option.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

  • Returns Option<U>

    The last non-none result.

    -
    +
    diff --git a/functions/index.mapWhile.html b/functions/index.mapWhile.html index 92ec9ee..9b2c705 100644 --- a/functions/index.mapWhile.html +++ b/functions/index.mapWhile.html @@ -3,4 +3,4 @@
  • fn: (value: T, index: number, array: T[]) => Option<U>

    A function that produces an Option.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

  • Returns U[]

    An array of mapped values.

    -
    +
    diff --git a/functions/index.reduceWhile.html b/functions/index.reduceWhile.html index 88a9380..2d92ae4 100644 --- a/functions/index.reduceWhile.html +++ b/functions/index.reduceWhile.html @@ -4,4 +4,4 @@
  • initialValue: U

    The initial value.

  • OptionalthisArg: any

    If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

  • Returns U

    The reduced value.

    -
    +
    diff --git a/index.html b/index.html index 238ada1..5d781b7 100644 --- a/index.html +++ b/index.html @@ -30,4 +30,4 @@

    See docs for more details.

    MIT @ CRIMX

    -
    +
    diff --git a/interfaces/index.ResultMatcher.html b/interfaces/index.ResultMatcher.html index 6e1a14e..b0d4ed3 100644 --- a/interfaces/index.ResultMatcher.html +++ b/interfaces/index.ResultMatcher.html @@ -1,3 +1,3 @@ -ResultMatcher | @wopjs/tsur - v0.1.6

    Interface ResultMatcher<T, E, U>

    interface ResultMatcher<T = any, E = any, U = any> {
        Err: (error: E) => U;
        Ok: (value: T) => U;
    }

    Type Parameters

    • T = any
    • E = any
    • U = any

    Properties

    Err +ResultMatcher | @wopjs/tsur - v0.1.6

    Interface ResultMatcher<T, E, U>

    interface ResultMatcher<T = any, E = any, U = any> {
        Err: (error: E) => U;
        Ok: (value: T) => U;
    }

    Type Parameters

    • T = any
    • E = any
    • U = any

    Properties

    Properties

    Err: (error: E) => U
    Ok: (value: T) => U
    +

    Properties

    Err: (error: E) => U
    Ok: (value: T) => U
    diff --git a/interfaces/patches_array.Array.html b/interfaces/patches_array.Array.html index ea29a7f..e1218f7 100644 --- a/interfaces/patches_array.Array.html +++ b/interfaces/patches_array.Array.html @@ -1,4 +1,4 @@ -Array | @wopjs/tsur - v0.1.6
    interface Array<T> {
        "[unscopables]": {
            "[unscopables]"?: boolean;
            length?: boolean;
            "[iterator]"?: any;
            $filterMap?: any;
            $first?: any;
            $firstIndex?: any;
            $firstMap?: any;
            $last?: any;
            $lastIndex?: any;
            $lastMap?: any;
            $mapWhile?: any;
            $reduceWhile?: any;
            at?: any;
            concat?: any;
            copyWithin?: any;
            entries?: any;
            every?: any;
            fill?: any;
            filter?: any;
            find?: any;
            findIndex?: any;
            findLast?: any;
            findLastIndex?: any;
            flat?: any;
            flatMap?: any;
            forEach?: any;
            includes?: any;
            indexOf?: any;
            join?: any;
            keys?: any;
            lastIndexOf?: any;
            map?: any;
            pop?: any;
            push?: any;
            reduce?: any;
            reduceRight?: any;
            reverse?: any;
            shift?: any;
            slice?: any;
            some?: any;
            sort?: any;
            splice?: any;
            toLocaleString?: any;
            toReversed?: any;
            toSorted?: any;
            toSpliced?: any;
            toString?: any;
            unshift?: any;
            values?: any;
            with?: any;
            [key: number]: undefined | boolean;
        };
        length: number;
        "[iterator]"(): ArrayIterator<T>;
        $filterMap<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): U[];
        $first(
            predicate?: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<T>;
        $firstIndex(
            predicate: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<number>;
        $firstMap<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): Option<U>;
        $last(
            predicate?: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<T>;
        $lastIndex(
            predicate: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<number>;
        $lastMap<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): Option<U>;
        $mapWhile<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): U[];
        $reduceWhile<U = T>(
            fn: (
                previousValue: U,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => Option<U>,
            initialValue: U,
            thisArg?: any,
        ): U;
        at(index: number): undefined | T;
        concat(...items: ConcatArray<T>[]): T[];
        concat(...items: (T | ConcatArray<T>)[]): T[];
        copyWithin(target: number, start: number, end?: number): this;
        entries(): ArrayIterator<[number, T]>;
        every<S>(
            predicate: (value: T, index: number, array: T[]) => value is S,
            thisArg?: any,
        ): this is S[];
        every(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): boolean;
        fill(value: T, start?: number, end?: number): this;
        filter<S>(
            predicate: (value: T, index: number, array: T[]) => value is S,
            thisArg?: any,
        ): S[];
        filter(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): T[];
        find<S>(
            predicate: (value: T, index: number, obj: T[]) => value is S,
            thisArg?: any,
        ): undefined | S;
        find(
            predicate: (value: T, index: number, obj: T[]) => unknown,
            thisArg?: any,
        ): undefined | T;
        findIndex(
            predicate: (value: T, index: number, obj: T[]) => unknown,
            thisArg?: any,
        ): number;
        findLast<S>(
            predicate: (value: T, index: number, array: T[]) => value is S,
            thisArg?: any,
        ): undefined | S;
        findLast(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): undefined | T;
        findLastIndex(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): number;
        flat<A, D extends number = 1>(this: A, depth?: D): FlatArray<A, D>[];
        flatMap<U, This = undefined>(
            callback: (
                this: This,
                value: T,
                index: number,
                array: T[],
            ) => U | readonly U[],
            thisArg?: This,
        ): U[];
        forEach(
            callbackfn: (value: T, index: number, array: T[]) => void,
            thisArg?: any,
        ): void;
        includes(searchElement: T, fromIndex?: number): boolean;
        indexOf(searchElement: T, fromIndex?: number): number;
        join(separator?: string): string;
        keys(): ArrayIterator<number>;
        lastIndexOf(searchElement: T, fromIndex?: number): number;
        map<U>(
            callbackfn: (value: T, index: number, array: T[]) => U,
            thisArg?: any,
        ): U[];
        pop(): undefined | T;
        push(...items: T[]): number;
        reduce(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
        ): T;
        reduce(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
            initialValue: T,
        ): T;
        reduce<U>(
            callbackfn: (
                previousValue: U,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => U,
            initialValue: U,
        ): U;
        reduceRight(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
        ): T;
        reduceRight(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
            initialValue: T,
        ): T;
        reduceRight<U>(
            callbackfn: (
                previousValue: U,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => U,
            initialValue: U,
        ): U;
        reverse(): T[];
        shift(): undefined | T;
        slice(start?: number, end?: number): T[];
        some(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): boolean;
        sort(compareFn?: (a: T, b: T) => number): this;
        splice(start: number, deleteCount?: number): T[];
        splice(start: number, deleteCount: number, ...items: T[]): T[];
        toLocaleString(): string;
        toLocaleString(
            locales: string | string[],
            options?: NumberFormatOptions & DateTimeFormatOptions,
        ): string;
        toReversed(): T[];
        toSorted(compareFn?: (a: T, b: T) => number): T[];
        toSpliced(start: number, deleteCount: number, ...items: T[]): T[];
        toSpliced(start: number, deleteCount?: number): T[];
        toString(): string;
        unshift(...items: T[]): number;
        values(): ArrayIterator<T>;
        with(index: number, value: T): T[];
        [n: number]: T;
    }

    Type Parameters

    • T

    Hierarchy

    • RelativeIndexable<T>
      • Array

    Indexable

    • [n: number]: T

    Properties

    [unscopables] +Array | @wopjs/tsur - v0.1.6
    interface Array<T> {
        "[unscopables]": {
            "[unscopables]"?: boolean;
            length?: boolean;
            "[iterator]"?: any;
            $filterMap?: any;
            $first?: any;
            $firstIndex?: any;
            $firstMap?: any;
            $last?: any;
            $lastIndex?: any;
            $lastMap?: any;
            $mapWhile?: any;
            $reduceWhile?: any;
            at?: any;
            concat?: any;
            copyWithin?: any;
            entries?: any;
            every?: any;
            fill?: any;
            filter?: any;
            find?: any;
            findIndex?: any;
            findLast?: any;
            findLastIndex?: any;
            flat?: any;
            flatMap?: any;
            forEach?: any;
            includes?: any;
            indexOf?: any;
            join?: any;
            keys?: any;
            lastIndexOf?: any;
            map?: any;
            pop?: any;
            push?: any;
            reduce?: any;
            reduceRight?: any;
            reverse?: any;
            shift?: any;
            slice?: any;
            some?: any;
            sort?: any;
            splice?: any;
            toLocaleString?: any;
            toReversed?: any;
            toSorted?: any;
            toSpliced?: any;
            toString?: any;
            unshift?: any;
            values?: any;
            with?: any;
            [key: number]: undefined | boolean;
        };
        length: number;
        "[iterator]"(): ArrayIterator<T>;
        $filterMap<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): U[];
        $first(
            predicate?: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<T>;
        $firstIndex(
            predicate: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<number>;
        $firstMap<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): Option<U>;
        $last(
            predicate?: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<T>;
        $lastIndex(
            predicate: (value: T, index: number, array: T[]) => boolean,
            thisArg?: any,
        ): Option<number>;
        $lastMap<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): Option<U>;
        $mapWhile<U>(
            fn: (value: T, index: number, array: T[]) => Option<U>,
            thisArg?: any,
        ): U[];
        $reduceWhile<U = T>(
            fn: (
                previousValue: U,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => Option<U>,
            initialValue: U,
            thisArg?: any,
        ): U;
        at(index: number): undefined | T;
        concat(...items: ConcatArray<T>[]): T[];
        concat(...items: (T | ConcatArray<T>)[]): T[];
        copyWithin(target: number, start: number, end?: number): this;
        entries(): ArrayIterator<[number, T]>;
        every<S>(
            predicate: (value: T, index: number, array: T[]) => value is S,
            thisArg?: any,
        ): this is S[];
        every(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): boolean;
        fill(value: T, start?: number, end?: number): this;
        filter<S>(
            predicate: (value: T, index: number, array: T[]) => value is S,
            thisArg?: any,
        ): S[];
        filter(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): T[];
        find<S>(
            predicate: (value: T, index: number, obj: T[]) => value is S,
            thisArg?: any,
        ): undefined | S;
        find(
            predicate: (value: T, index: number, obj: T[]) => unknown,
            thisArg?: any,
        ): undefined | T;
        findIndex(
            predicate: (value: T, index: number, obj: T[]) => unknown,
            thisArg?: any,
        ): number;
        findLast<S>(
            predicate: (value: T, index: number, array: T[]) => value is S,
            thisArg?: any,
        ): undefined | S;
        findLast(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): undefined | T;
        findLastIndex(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): number;
        flat<A, D extends number = 1>(this: A, depth?: D): FlatArray<A, D>[];
        flatMap<U, This = undefined>(
            callback: (
                this: This,
                value: T,
                index: number,
                array: T[],
            ) => U | readonly U[],
            thisArg?: This,
        ): U[];
        forEach(
            callbackfn: (value: T, index: number, array: T[]) => void,
            thisArg?: any,
        ): void;
        includes(searchElement: T, fromIndex?: number): boolean;
        indexOf(searchElement: T, fromIndex?: number): number;
        join(separator?: string): string;
        keys(): ArrayIterator<number>;
        lastIndexOf(searchElement: T, fromIndex?: number): number;
        map<U>(
            callbackfn: (value: T, index: number, array: T[]) => U,
            thisArg?: any,
        ): U[];
        pop(): undefined | T;
        push(...items: T[]): number;
        reduce(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
        ): T;
        reduce(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
            initialValue: T,
        ): T;
        reduce<U>(
            callbackfn: (
                previousValue: U,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => U,
            initialValue: U,
        ): U;
        reduceRight(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
        ): T;
        reduceRight(
            callbackfn: (
                previousValue: T,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => T,
            initialValue: T,
        ): T;
        reduceRight<U>(
            callbackfn: (
                previousValue: U,
                currentValue: T,
                currentIndex: number,
                array: T[],
            ) => U,
            initialValue: U,
        ): U;
        reverse(): T[];
        shift(): undefined | T;
        slice(start?: number, end?: number): T[];
        some(
            predicate: (value: T, index: number, array: T[]) => unknown,
            thisArg?: any,
        ): boolean;
        sort(compareFn?: (a: T, b: T) => number): this;
        splice(start: number, deleteCount?: number): T[];
        splice(start: number, deleteCount: number, ...items: T[]): T[];
        toLocaleString(): string;
        toLocaleString(
            locales: string | string[],
            options?: NumberFormatOptions & DateTimeFormatOptions,
        ): string;
        toReversed(): T[];
        toSorted(compareFn?: (a: T, b: T) => number): T[];
        toSpliced(start: number, deleteCount: number, ...items: T[]): T[];
        toSpliced(start: number, deleteCount?: number): T[];
        toString(): string;
        unshift(...items: T[]): number;
        values(): ArrayIterator<T>;
        with(index: number, value: T): T[];
        [n: number]: T;
    }

    Type Parameters

    • T

    Hierarchy

    • RelativeIndexable<T>
      • Array

    Indexable

    • [n: number]: T

    Properties

    Methods

    [iterator] $filterMap @@ -61,49 +61,49 @@

    Type Parameters

    • U

    Parameters

    • fn: (value: T, index: number, array: T[]) => Option<U>

      A function that produces an Option.

    • OptionalthisArg: any

      If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

    Returns U[]

    An array of filtered and mapped values.

    -
    • From tsur.

      +
    • From tsur.

      first finds the first item that matches a predicate. Returns the first item of array if no predicate is provided.

      Parameters

      • Optionalpredicate: (value: T, index: number, array: T[]) => boolean

        A predicate function.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<T>

      The first item that matches the predicate, or None if no item matches.

      -
    • From tsur.

      +
    • From tsur.

      Returns the index of the first element in the array that satisfies the provided testing function. Otherwise None is returned.

      Parameters

      • predicate: (value: T, index: number, array: T[]) => boolean

        A predicate function.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<number>

      The index of the first item that matches the predicate, or None if no item matches.

      -
    • From tsur.

      Applies function to the elements of iterator and returns the first non-none result.

      firstMap(fn) is the lighter version of filterMap(fn).first().

      Type Parameters

      • U

      Parameters

      • fn: (value: T, index: number, array: T[]) => Option<U>

        A function that produces an Option.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<U>

      The first non-none result.

      -
    • From tsur.

      +
    • From tsur.

      last finds the last item that matches a predicate. Returns the last item of array if no predicate is provided.

      Parameters

      • Optionalpredicate: (value: T, index: number, array: T[]) => boolean

        A predicate function.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<T>

      The last item that matches the predicate, or None if no item matches.

      -
    • From tsur.

      +
    • From tsur.

      Returns the index of the last element in the array where predicate is true, and None otherwise.

      Parameters

      • predicate: (value: T, index: number, array: T[]) => boolean

        lastIndex calls predicate once for each element of the array, in backward order, until it finds one where predicate returns true.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<number>

      The index of the last item that matches the predicate, or None if no item matches.

      -
    • From tsur.

      lastMap(fn) is the lighter version of filterMap(fn).last().

      Type Parameters

      • U

      Parameters

      • fn: (value: T, index: number, array: T[]) => Option<U>

        A function that produces an Option.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns Option<U>

      The last non-none result.

      -
    • From tsur.

      +
    • From tsur.

      mapWhile maps an iterable until the first None is encountered.

      Type Parameters

      • U

      Parameters

      • fn: (value: T, index: number, array: T[]) => Option<U>

        A function that produces an Option.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns U[]

      An array of mapped values.

      -
    • From tsur.

      +
    • From tsur.

      reduceWhile reduces an iterable until the first None is encountered.

      Type Parameters

      • U = T

      Parameters

      • fn: (
            previousValue: U,
            currentValue: T,
            currentIndex: number,
            array: T[],
        ) => Option<U>

        A function that produces an Option.

      • initialValue: U

        The initial value.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

      Returns U

      The reduced value.

      -
    • Returns the item located at the specified index.

      +
    • Returns the item located at the specified index.

      Parameters

      • index: number

        The zero-based index of the desired code unit. A negative index will count back from the last item.

      Returns undefined | T

    • Combines two or more arrays. This method returns a new array without modifying any existing arrays.

      diff --git a/types/index.Err.html b/types/index.Err.html index c2f8a1c..8a4e8da 100644 --- a/types/index.Err.html +++ b/types/index.Err.html @@ -1 +1 @@ -Err | @wopjs/tsur - v0.1.6

      Type Alias Err<E>

      Err: Result<any, E>

      Type Parameters

      • E
      +Err | @wopjs/tsur - v0.1.6

      Type Alias Err<E>

      Err: Result<any, E>

      Type Parameters

      • E
      diff --git a/types/index.None.html b/types/index.None.html index d2fa2af..c3bbb9b 100644 --- a/types/index.None.html +++ b/types/index.None.html @@ -1 +1 @@ -None | @wopjs/tsur - v0.1.6

      Type Alias None

      None: Option<any>
      +None | @wopjs/tsur - v0.1.6

      Type Alias None

      None: Option<any>
      diff --git a/types/index.Ok.html b/types/index.Ok.html index 57ed001..873ab91 100644 --- a/types/index.Ok.html +++ b/types/index.Ok.html @@ -1 +1 @@ -Ok | @wopjs/tsur - v0.1.6

      Type Alias Ok<T>

      Ok: Result<T, any>

      Type Parameters

      • T
      +Ok | @wopjs/tsur - v0.1.6

      Type Alias Ok<T>

      Ok: Result<T, any>

      Type Parameters

      • T
      diff --git a/types/index.Some.html b/types/index.Some.html index fe452fa..3976720 100644 --- a/types/index.Some.html +++ b/types/index.Some.html @@ -1 +1 @@ -Some | @wopjs/tsur - v0.1.6

      Type Alias Some<T>

      Some: Option<T>

      Type Parameters

      • T
      +Some | @wopjs/tsur - v0.1.6

      Type Alias Some<T>

      Some: Option<T>

      Type Parameters

      • T
      diff --git a/types/index.UnwrapErr.html b/types/index.UnwrapErr.html index 645539a..c701c74 100644 --- a/types/index.UnwrapErr.html +++ b/types/index.UnwrapErr.html @@ -1 +1 @@ -UnwrapErr | @wopjs/tsur - v0.1.6

      Type Alias UnwrapErr<E, Default>

      UnwrapErr: E extends Result<infer _S, infer U> ? U : Default

      Type Parameters

      • E
      • Default = E
      +UnwrapErr | @wopjs/tsur - v0.1.6

      Type Alias UnwrapErr<E, Default>

      UnwrapErr: E extends Result<infer _S, infer U> ? U : Default

      Type Parameters

      • E
      • Default = E
      diff --git a/types/index.UnwrapOk.html b/types/index.UnwrapOk.html index d5f3ebf..0023034 100644 --- a/types/index.UnwrapOk.html +++ b/types/index.UnwrapOk.html @@ -1 +1 @@ -UnwrapOk | @wopjs/tsur - v0.1.6

      Type Alias UnwrapOk<T, Default>

      UnwrapOk: T extends Result<infer U> ? U : Default

      Type Parameters

      • T
      • Default = T
      +UnwrapOk | @wopjs/tsur - v0.1.6

      Type Alias UnwrapOk<T, Default>

      UnwrapOk: T extends Result<infer U> ? U : Default

      Type Parameters

      • T
      • Default = T
      diff --git a/types/index.UnwrapOption.html b/types/index.UnwrapOption.html index 418827e..12a3f31 100644 --- a/types/index.UnwrapOption.html +++ b/types/index.UnwrapOption.html @@ -1 +1 @@ -UnwrapOption | @wopjs/tsur - v0.1.6

      Type Alias UnwrapOption<T, Default>

      UnwrapOption: T extends Option<infer U> ? U : Default

      Type Parameters

      • T
      • Default = T
      +UnwrapOption | @wopjs/tsur - v0.1.6

      Type Alias UnwrapOption<T, Default>

      UnwrapOption: T extends Option<infer U> ? U : Default

      Type Parameters

      • T
      • Default = T
      diff --git a/variables/index.None-1.html b/variables/index.None-1.html index b764db9..353f1f4 100644 --- a/variables/index.None-1.html +++ b/variables/index.None-1.html @@ -1,2 +1,2 @@ None | @wopjs/tsur - v0.1.6

      Variable NoneConst

      None: None = ...

      The None value.

      -
      +
    diff --git a/variables/patches_array.Array-1.html b/variables/patches_array.Array-1.html index 05157a0..178fdac 100644 --- a/variables/patches_array.Array-1.html +++ b/variables/patches_array.Array-1.html @@ -1 +1 @@ -Array | @wopjs/tsur - v0.1.6
    Array: ArrayConstructor
    +Array | @wopjs/tsur - v0.1.6
    Array: ArrayConstructor