From ef48fdea02f0dfdded4bc0ebda9cb32947daaf7a Mon Sep 17 00:00:00 2001 From: crimx Date: Mon, 2 Dec 2024 03:05:47 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20wopjs/ts?= =?UTF-8?q?ur@f2fb0bfb5f4c58ba2d7dc256f21ce4ffd4ecd621=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/main.js | 6 +-- assets/style.css | 14 ++++++ 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 +- 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 +- 27 files changed, 118 insertions(+), 104 deletions(-) diff --git a/assets/main.js b/assets/main.js index 74835dc..e0af265 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),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 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 pe(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",()=>{pe(e,t)}),pe(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"?(fe(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(fe(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 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 fe(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=document.createElement("span");i.classList.add("tsd-hierarchy-toggle"),i.textContent=window.translations.hierarchy_expand,t.querySelector("h4 a")?.insertAdjacentElement("afterend",i),i.insertAdjacentText("beforebegin",", "),i.addEventListener("click",()=>{i.textContent===window.translations.hierarchy_expand?(a.insertAdjacentElement("afterend",l),a.remove(),i.textContent=window.translations.hierarchy_collapse):(l.insertAdjacentElement("afterend",a),l.remove(),i.textContent=window.translations.hierarchy_expand)});let s=+t.dataset.refl,o=await new Response(r).json(),a=t.querySelector("ul"),l=document.createElement("ul");l.classList.add("tsd-hierarchy"),Ze(l,o,s)}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"),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();})(); +`,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();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/assets/style.css b/assets/style.css index bb51d4b..499bc28 100644 --- a/assets/style.css +++ b/assets/style.css @@ -784,6 +784,20 @@ cursor: pointer; } + .tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); + } + .tsd-full-hierarchy, + .tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; + } + .tsd-full-hierarchy ul { + padding-left: 1.5rem; + } .tsd-full-hierarchy a { padding: 0.25rem 0 !important; font-size: 1rem; diff --git a/classes/index.Option.html b/classes/index.Option.html index 3cda4f4..a3a4eea 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 4318af9..138f990 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 d0f6026..0813dc1 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 f440f08..b48dd61 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 1a16504..8dc2b8d 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 562639f..b7ac378 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 9ded706..0e96c50 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 9e51cfa..ccdca34 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 222bd99..7e42433 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 a89dc28..531e787 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 3bf9e32..48ad73a 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 189a549..8f10a24 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 ea5d351..92ec9ee 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 d3fce29..88a9380 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/interfaces/index.ResultMatcher.html b/interfaces/index.ResultMatcher.html index 8a63727..6e1a14e 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 343f427..ea29a7f 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 789a727..c2f8a1c 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 a036bf3..d2fa2af 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 7ebe4c0..57ed001 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 7095e6b..fe452fa 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 54c9b07..645539a 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 a3685fb..d5f3ebf 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 a9ef08c..418827e 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 b7bc2cf..b764db9 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 4db894a..05157a0 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