@typed/fx 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -1
- package/cjs/Subject.d.ts +11 -4
- package/cjs/Subject.d.ts.map +1 -1
- package/cjs/Subject.js +62 -12
- package/cjs/Subject.js.map +1 -1
- package/esm/Subject.d.ts +11 -4
- package/esm/Subject.d.ts.map +1 -1
- package/esm/Subject.js +61 -11
- package/esm/Subject.js.map +1 -1
- package/package.json +1 -1
- package/src/Subject.test.ts +30 -2
- package/src/Subject.ts +68 -11
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/Users/TylorSteinberger/code/tylors/fx/src/Fx.ts":"1","/Users/TylorSteinberger/code/tylors/fx/src/_internal.ts":"2","/Users/TylorSteinberger/code/tylors/fx/src/combine.test.ts":"3","/Users/TylorSteinberger/code/tylors/fx/src/combine.ts":"4","/Users/TylorSteinberger/code/tylors/fx/src/continueWith.ts":"5","/Users/TylorSteinberger/code/tylors/fx/src/debounce.test.ts":"6","/Users/TylorSteinberger/code/tylors/fx/src/debounce.ts":"7","/Users/TylorSteinberger/code/tylors/fx/src/delay.test.ts":"8","/Users/TylorSteinberger/code/tylors/fx/src/delay.ts":"9","/Users/TylorSteinberger/code/tylors/fx/src/during.ts":"10","/Users/TylorSteinberger/code/tylors/fx/src/flatMap.test.ts":"11","/Users/TylorSteinberger/code/tylors/fx/src/flatMap.ts":"12","/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.ts":"13","/Users/TylorSteinberger/code/tylors/fx/src/fromEffect.ts":"14","/Users/TylorSteinberger/code/tylors/fx/src/hold.test.ts":"15","/Users/TylorSteinberger/code/tylors/fx/src/hold.ts":"16","/Users/TylorSteinberger/code/tylors/fx/src/index.ts":"17","/Users/TylorSteinberger/code/tylors/fx/src/merge.test.ts":"18","/Users/TylorSteinberger/code/tylors/fx/src/merge.ts":"19","/Users/TylorSteinberger/code/tylors/fx/src/multicast.test.ts":"20","/Users/TylorSteinberger/code/tylors/fx/src/multicast.ts":"21","/Users/TylorSteinberger/code/tylors/fx/src/orElse.ts":"22","/Users/TylorSteinberger/code/tylors/fx/src/periodic.test.ts":"23","/Users/TylorSteinberger/code/tylors/fx/src/periodic.ts":"24","/Users/TylorSteinberger/code/tylors/fx/src/provide.ts":"25","/Users/TylorSteinberger/code/tylors/fx/src/scheduled.ts":"26","/Users/TylorSteinberger/code/tylors/fx/src/since.ts":"27","/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.ts":"28","/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.ts":"29","/Users/TylorSteinberger/code/tylors/fx/src/slice.test.ts":"30","/Users/TylorSteinberger/code/tylors/fx/src/slice.ts":"31","/Users/TylorSteinberger/code/tylors/fx/src/snapshot.ts":"32","/Users/TylorSteinberger/code/tylors/fx/src/suspendSucceed.ts":"33","/Users/TylorSteinberger/code/tylors/fx/src/switchMap.test.ts":"34","/Users/TylorSteinberger/code/tylors/fx/src/switchMap.ts":"35","/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.ts":"36","/Users/TylorSteinberger/code/tylors/fx/src/throttle.test.ts":"37","/Users/TylorSteinberger/code/tylors/fx/src/throttle.ts":"38","/Users/TylorSteinberger/code/tylors/fx/src/transform.ts":"39","/Users/TylorSteinberger/code/tylors/fx/src/until.test.ts":"40","/Users/TylorSteinberger/code/tylors/fx/src/until.ts":"41","/Users/TylorSteinberger/code/tylors/fx/src/zip.test.ts":"42","/Users/TylorSteinberger/code/tylors/fx/src/zip.ts":"43","/Users/TylorSteinberger/code/tylors/fx/src/continueWith.test.ts":"44","/Users/TylorSteinberger/code/tylors/fx/src/during.test.ts":"45","/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.test.ts":"46","/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.ts":"47","/Users/TylorSteinberger/code/tylors/fx/src/filterMap.test.ts":"48","/Users/TylorSteinberger/code/tylors/fx/src/filterMap.ts":"49","/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.test.ts":"50","/Users/TylorSteinberger/code/tylors/fx/src/fromIterable.ts":"51","/Users/TylorSteinberger/code/tylors/fx/src/mapCause.test.ts":"52","/Users/TylorSteinberger/code/tylors/fx/src/mapCause.ts":"53","/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.test.ts":"54","/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.ts":"55","/Users/TylorSteinberger/code/tylors/fx/src/orElse.test.ts":"56","/Users/TylorSteinberger/code/tylors/fx/src/provide.test.ts":"57","/Users/TylorSteinberger/code/tylors/fx/src/runCollect.ts":"58","/Users/TylorSteinberger/code/tylors/fx/src/runDrain.ts":"59","/Users/TylorSteinberger/code/tylors/fx/src/runObserve.ts":"60","/Users/TylorSteinberger/code/tylors/fx/src/runReduce.ts":"61","/Users/TylorSteinberger/code/tylors/fx/src/since.test.ts":"62","/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.test.ts":"63","/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.test.ts":"64","/Users/TylorSteinberger/code/tylors/fx/src/snapshot.test.ts":"65","/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.test.ts":"66","/Users/TylorSteinberger/code/tylors/fx/src/tapEffect.ts":"67","/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.test.ts":"68","/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.ts":"69","/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.test.ts":"70","/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.ts":"71","/Users/TylorSteinberger/code/tylors/fx/src/Subject.ts":"72","/Users/TylorSteinberger/code/tylors/fx/src/Subject.test.ts":"73","/Users/TylorSteinberger/code/tylors/fx/src/struct.ts":"74"},{"size":1543,"mtime":1667245032170,"results":"75","hashOfConfig":"76"},{"size":2390,"mtime":1666909836963,"results":"77","hashOfConfig":"76"},{"size":919,"mtime":1666901217496,"results":"78","hashOfConfig":"76"},{"size":2060,"mtime":1666901217496,"results":"79","hashOfConfig":"76"},{"size":591,"mtime":1666901217497,"results":"80","hashOfConfig":"76"},{"size":522,"mtime":1666901217497,"results":"81","hashOfConfig":"76"},{"size":1617,"mtime":1666901217497,"results":"82","hashOfConfig":"76"},{"size":701,"mtime":1666901217498,"results":"83","hashOfConfig":"76"},{"size":557,"mtime":1666909013033,"results":"84","hashOfConfig":"76"},{"size":1674,"mtime":1666909765898,"results":"85","hashOfConfig":"76"},{"size":1506,"mtime":1666901217500,"results":"86","hashOfConfig":"76"},{"size":1216,"mtime":1667243469286,"results":"87","hashOfConfig":"76"},{"size":706,"mtime":1666906589152,"results":"88","hashOfConfig":"76"},{"size":3822,"mtime":1667245505029,"results":"89","hashOfConfig":"76"},{"size":1443,"mtime":1666901217502,"results":"90","hashOfConfig":"76"},{"size":3501,"mtime":1667336061181,"results":"91","hashOfConfig":"76"},{"size":1272,"mtime":1667266343718,"results":"92","hashOfConfig":"76"},{"size":530,"mtime":1666901217504,"results":"93","hashOfConfig":"76"},{"size":977,"mtime":1666901217505,"results":"94","hashOfConfig":"76"},{"size":1293,"mtime":1666901217505,"results":"95","hashOfConfig":"76"},{"size":3363,"mtime":1667243508744,"results":"96","hashOfConfig":"76"},{"size":1034,"mtime":1666901391894,"results":"97","hashOfConfig":"76"},{"size":648,"mtime":1666901217507,"results":"98","hashOfConfig":"76"},{"size":429,"mtime":1666900225601,"results":"99","hashOfConfig":"76"},{"size":2095,"mtime":1666901217508,"results":"100","hashOfConfig":"76"},{"size":2515,"mtime":1666901217509,"results":"101","hashOfConfig":"76"},{"size":1010,"mtime":1666909377506,"results":"102","hashOfConfig":"76"},{"size":959,"mtime":1666901217510,"results":"103","hashOfConfig":"76"},{"size":1300,"mtime":1666901217511,"results":"104","hashOfConfig":"76"},{"size":530,"mtime":1666901217511,"results":"105","hashOfConfig":"76"},{"size":1145,"mtime":1666901217511,"results":"106","hashOfConfig":"76"},{"size":1543,"mtime":1667245692042,"results":"107","hashOfConfig":"76"},{"size":152,"mtime":1666901217512,"results":"108","hashOfConfig":"76"},{"size":976,"mtime":1666901217513,"results":"109","hashOfConfig":"76"},{"size":1628,"mtime":1666901217513,"results":"110","hashOfConfig":"76"},{"size":777,"mtime":1666901217514,"results":"111","hashOfConfig":"76"},{"size":527,"mtime":1666901217515,"results":"112","hashOfConfig":"76"},{"size":1810,"mtime":1666901217515,"results":"113","hashOfConfig":"76"},{"size":1672,"mtime":1666901217516,"results":"114","hashOfConfig":"76"},{"size":577,"mtime":1666910433646,"results":"115","hashOfConfig":"76"},{"size":859,"mtime":1666909733301,"results":"116","hashOfConfig":"76"},{"size":832,"mtime":1666901217517,"results":"117","hashOfConfig":"76"},{"size":2163,"mtime":1666901217517,"results":"118","hashOfConfig":"76"},{"size":654,"mtime":1666901217496,"results":"119","hashOfConfig":"76"},{"size":1195,"mtime":1666923294384,"results":"120","hashOfConfig":"76"},{"size":2106,"mtime":1666901217498,"results":"121","hashOfConfig":"76"},{"size":3589,"mtime":1667243426349,"results":"122","hashOfConfig":"76"},{"size":917,"mtime":1666901217499,"results":"123","hashOfConfig":"76"},{"size":2254,"mtime":1667243443566,"results":"124","hashOfConfig":"76"},{"size":715,"mtime":1666901217501,"results":"125","hashOfConfig":"76"},{"size":541,"mtime":1667245537329,"results":"126","hashOfConfig":"76"},{"size":988,"mtime":1666901217503,"results":"127","hashOfConfig":"76"},{"size":636,"mtime":1667244943264,"results":"128","hashOfConfig":"76"},{"size":557,"mtime":1666901217504,"results":"129","hashOfConfig":"76"},{"size":474,"mtime":1666901217504,"results":"130","hashOfConfig":"76"},{"size":578,"mtime":1666901217506,"results":"131","hashOfConfig":"76"},{"size":1519,"mtime":1666901217507,"results":"132","hashOfConfig":"76"},{"size":595,"mtime":1667245260972,"results":"133","hashOfConfig":"76"},{"size":747,"mtime":1667245189503,"results":"134","hashOfConfig":"76"},{"size":1006,"mtime":1667245204826,"results":"135","hashOfConfig":"76"},{"size":1535,"mtime":1666901217509,"results":"136","hashOfConfig":"76"},{"size":1202,"mtime":1666923495584,"results":"137","hashOfConfig":"76"},{"size":770,"mtime":1666901217510,"results":"138","hashOfConfig":"76"},{"size":1116,"mtime":1666901217510,"results":"139","hashOfConfig":"76"},{"size":1270,"mtime":1666901217512,"results":"140","hashOfConfig":"76"},{"size":1080,"mtime":1666901217513,"results":"141","hashOfConfig":"76"},{"size":656,"mtime":1666901217514,"results":"142","hashOfConfig":"76"},{"size":695,"mtime":1667338167016,"results":"143","hashOfConfig":"76"},{"size":1607,"mtime":1667338167016,"results":"144","hashOfConfig":"76"},{"size":597,"mtime":1666901217517,"results":"145","hashOfConfig":"76"},{"size":1364,"mtime":1666901217517,"results":"146","hashOfConfig":"76"},{"size":4489,"mtime":1667338244821,"results":"147","hashOfConfig":"76"},{"size":1700,"mtime":1667338611471,"results":"148","hashOfConfig":"76"},{"size":612,"mtime":1667266401971,"results":"149","hashOfConfig":"76"},{"filePath":"150","messages":"151","suppressedMessages":"152","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1338ja8",{"filePath":"153","messages":"154","suppressedMessages":"155","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","suppressedMessages":"158","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","suppressedMessages":"161","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","suppressedMessages":"164","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"165","messages":"166","suppressedMessages":"167","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","suppressedMessages":"170","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"171","messages":"172","suppressedMessages":"173","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","suppressedMessages":"176","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","suppressedMessages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","suppressedMessages":"182","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"183","messages":"184","suppressedMessages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","suppressedMessages":"188","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"189","messages":"190","suppressedMessages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","suppressedMessages":"194","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"195","messages":"196","suppressedMessages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","suppressedMessages":"200","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"201","messages":"202","suppressedMessages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","suppressedMessages":"206","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"207","messages":"208","suppressedMessages":"209","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","suppressedMessages":"212","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"213","messages":"214","suppressedMessages":"215","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","suppressedMessages":"218","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"219","messages":"220","suppressedMessages":"221","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"222","messages":"223","suppressedMessages":"224","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"225","messages":"226","suppressedMessages":"227","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"228","messages":"229","suppressedMessages":"230","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"231","messages":"232","suppressedMessages":"233","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"234","messages":"235","suppressedMessages":"236","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"237","messages":"238","suppressedMessages":"239","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"240","messages":"241","suppressedMessages":"242","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"243","messages":"244","suppressedMessages":"245","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"246","messages":"247","suppressedMessages":"248","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"249","messages":"250","suppressedMessages":"251","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"252","messages":"253","suppressedMessages":"254","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"255","messages":"256","suppressedMessages":"257","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"258","messages":"259","suppressedMessages":"260","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"261","messages":"262","suppressedMessages":"263","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"264","messages":"265","suppressedMessages":"266","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"267","messages":"268","suppressedMessages":"269","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"270","messages":"271","suppressedMessages":"272","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"273","messages":"274","suppressedMessages":"275","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"276","messages":"277","suppressedMessages":"278","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"279","messages":"280","suppressedMessages":"281","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"282","messages":"283","suppressedMessages":"284","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"285","messages":"286","suppressedMessages":"287","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"288","messages":"289","suppressedMessages":"290","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"291","messages":"292","suppressedMessages":"293","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"294","messages":"295","suppressedMessages":"296","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"297","messages":"298","suppressedMessages":"299","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"300","messages":"301","suppressedMessages":"302","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"303","messages":"304","suppressedMessages":"305","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"306","messages":"307","suppressedMessages":"308","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"309","messages":"310","suppressedMessages":"311","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"312","messages":"313","suppressedMessages":"314","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"315","messages":"316","suppressedMessages":"317","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"318","messages":"319","suppressedMessages":"320","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"321","messages":"322","suppressedMessages":"323","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"324","messages":"325","suppressedMessages":"326","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"327","messages":"328","suppressedMessages":"329","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"330","messages":"331","suppressedMessages":"332","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"333","messages":"334","suppressedMessages":"335","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"336","messages":"337","suppressedMessages":"338","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"339","messages":"340","suppressedMessages":"341","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"342","messages":"343","suppressedMessages":"344","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"345","messages":"346","suppressedMessages":"347","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"348","messages":"349","suppressedMessages":"350","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"351","messages":"352","suppressedMessages":"353","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"354","messages":"355","suppressedMessages":"356","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"357","messages":"358","suppressedMessages":"359","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"360","messages":"361","suppressedMessages":"362","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"363","messages":"364","suppressedMessages":"365","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"366","messages":"367","suppressedMessages":"368","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"369","messages":"370","suppressedMessages":"371","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/TylorSteinberger/code/tylors/fx/src/Fx.ts",[],["372","373","374","375","376","377"],"/Users/TylorSteinberger/code/tylors/fx/src/_internal.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/combine.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/combine.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/continueWith.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/debounce.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/debounce.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/delay.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/delay.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/during.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMap.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMap.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/fromEffect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/hold.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/hold.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/index.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/merge.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/merge.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/multicast.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/multicast.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/orElse.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/periodic.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/periodic.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/provide.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/scheduled.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/since.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/slice.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/slice.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/snapshot.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/suspendSucceed.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/switchMap.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/switchMap.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/throttle.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/throttle.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/transform.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/until.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/until.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zip.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zip.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/continueWith.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/during.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterMap.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterMap.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/fromIterable.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapCause.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapCause.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/orElse.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/provide.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runCollect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runDrain.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runObserve.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runReduce.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/since.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/snapshot.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/tapEffect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/Subject.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/Subject.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/struct.ts",[],[],{"ruleId":"378","severity":1,"message":"379","line":22,"column":63,"nodeType":"380","messageId":"381","endLine":22,"endColumn":65,"suppressions":"382"},{"ruleId":"378","severity":1,"message":"383","line":22,"column":73,"nodeType":"380","messageId":"381","endLine":22,"endColumn":75,"suppressions":"384"},{"ruleId":"378","severity":1,"message":"385","line":23,"column":51,"nodeType":"380","messageId":"381","endLine":23,"endColumn":53,"suppressions":"386"},{"ruleId":"378","severity":1,"message":"383","line":23,"column":70,"nodeType":"380","messageId":"381","endLine":23,"endColumn":72,"suppressions":"387"},{"ruleId":"378","severity":1,"message":"385","line":24,"column":51,"nodeType":"380","messageId":"381","endLine":24,"endColumn":53,"suppressions":"388"},{"ruleId":"378","severity":1,"message":"379","line":24,"column":61,"nodeType":"380","messageId":"381","endLine":24,"endColumn":63,"suppressions":"389"},"@typescript-eslint/no-unused-vars","'_E' is defined but never used.","Identifier","unusedVar",["390"],"'_A' is defined but never used.",["391"],"'_R' is defined but never used.",["392"],["393"],["394"],["395"],{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},"directive",""]
|
|
1
|
+
[{"/Users/TylorSteinberger/code/tylors/fx/src/Fx.ts":"1","/Users/TylorSteinberger/code/tylors/fx/src/_internal.ts":"2","/Users/TylorSteinberger/code/tylors/fx/src/combine.test.ts":"3","/Users/TylorSteinberger/code/tylors/fx/src/combine.ts":"4","/Users/TylorSteinberger/code/tylors/fx/src/continueWith.ts":"5","/Users/TylorSteinberger/code/tylors/fx/src/debounce.test.ts":"6","/Users/TylorSteinberger/code/tylors/fx/src/debounce.ts":"7","/Users/TylorSteinberger/code/tylors/fx/src/delay.test.ts":"8","/Users/TylorSteinberger/code/tylors/fx/src/delay.ts":"9","/Users/TylorSteinberger/code/tylors/fx/src/during.ts":"10","/Users/TylorSteinberger/code/tylors/fx/src/flatMap.test.ts":"11","/Users/TylorSteinberger/code/tylors/fx/src/flatMap.ts":"12","/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.ts":"13","/Users/TylorSteinberger/code/tylors/fx/src/fromEffect.ts":"14","/Users/TylorSteinberger/code/tylors/fx/src/hold.test.ts":"15","/Users/TylorSteinberger/code/tylors/fx/src/hold.ts":"16","/Users/TylorSteinberger/code/tylors/fx/src/index.ts":"17","/Users/TylorSteinberger/code/tylors/fx/src/merge.test.ts":"18","/Users/TylorSteinberger/code/tylors/fx/src/merge.ts":"19","/Users/TylorSteinberger/code/tylors/fx/src/multicast.test.ts":"20","/Users/TylorSteinberger/code/tylors/fx/src/multicast.ts":"21","/Users/TylorSteinberger/code/tylors/fx/src/orElse.ts":"22","/Users/TylorSteinberger/code/tylors/fx/src/periodic.test.ts":"23","/Users/TylorSteinberger/code/tylors/fx/src/periodic.ts":"24","/Users/TylorSteinberger/code/tylors/fx/src/provide.ts":"25","/Users/TylorSteinberger/code/tylors/fx/src/scheduled.ts":"26","/Users/TylorSteinberger/code/tylors/fx/src/since.ts":"27","/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.ts":"28","/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.ts":"29","/Users/TylorSteinberger/code/tylors/fx/src/slice.test.ts":"30","/Users/TylorSteinberger/code/tylors/fx/src/slice.ts":"31","/Users/TylorSteinberger/code/tylors/fx/src/snapshot.ts":"32","/Users/TylorSteinberger/code/tylors/fx/src/suspendSucceed.ts":"33","/Users/TylorSteinberger/code/tylors/fx/src/switchMap.test.ts":"34","/Users/TylorSteinberger/code/tylors/fx/src/switchMap.ts":"35","/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.ts":"36","/Users/TylorSteinberger/code/tylors/fx/src/throttle.test.ts":"37","/Users/TylorSteinberger/code/tylors/fx/src/throttle.ts":"38","/Users/TylorSteinberger/code/tylors/fx/src/transform.ts":"39","/Users/TylorSteinberger/code/tylors/fx/src/until.test.ts":"40","/Users/TylorSteinberger/code/tylors/fx/src/until.ts":"41","/Users/TylorSteinberger/code/tylors/fx/src/zip.test.ts":"42","/Users/TylorSteinberger/code/tylors/fx/src/zip.ts":"43","/Users/TylorSteinberger/code/tylors/fx/src/continueWith.test.ts":"44","/Users/TylorSteinberger/code/tylors/fx/src/during.test.ts":"45","/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.test.ts":"46","/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.ts":"47","/Users/TylorSteinberger/code/tylors/fx/src/filterMap.test.ts":"48","/Users/TylorSteinberger/code/tylors/fx/src/filterMap.ts":"49","/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.test.ts":"50","/Users/TylorSteinberger/code/tylors/fx/src/fromIterable.ts":"51","/Users/TylorSteinberger/code/tylors/fx/src/mapCause.test.ts":"52","/Users/TylorSteinberger/code/tylors/fx/src/mapCause.ts":"53","/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.test.ts":"54","/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.ts":"55","/Users/TylorSteinberger/code/tylors/fx/src/orElse.test.ts":"56","/Users/TylorSteinberger/code/tylors/fx/src/provide.test.ts":"57","/Users/TylorSteinberger/code/tylors/fx/src/runCollect.ts":"58","/Users/TylorSteinberger/code/tylors/fx/src/runDrain.ts":"59","/Users/TylorSteinberger/code/tylors/fx/src/runObserve.ts":"60","/Users/TylorSteinberger/code/tylors/fx/src/runReduce.ts":"61","/Users/TylorSteinberger/code/tylors/fx/src/since.test.ts":"62","/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.test.ts":"63","/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.test.ts":"64","/Users/TylorSteinberger/code/tylors/fx/src/snapshot.test.ts":"65","/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.test.ts":"66","/Users/TylorSteinberger/code/tylors/fx/src/tapEffect.ts":"67","/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.test.ts":"68","/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.ts":"69","/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.test.ts":"70","/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.ts":"71","/Users/TylorSteinberger/code/tylors/fx/src/Subject.ts":"72","/Users/TylorSteinberger/code/tylors/fx/src/Subject.test.ts":"73","/Users/TylorSteinberger/code/tylors/fx/src/struct.ts":"74"},{"size":1543,"mtime":1667245032170,"results":"75","hashOfConfig":"76"},{"size":2390,"mtime":1666909836963,"results":"77","hashOfConfig":"76"},{"size":919,"mtime":1666901217496,"results":"78","hashOfConfig":"76"},{"size":2060,"mtime":1666901217496,"results":"79","hashOfConfig":"76"},{"size":591,"mtime":1666901217497,"results":"80","hashOfConfig":"76"},{"size":522,"mtime":1666901217497,"results":"81","hashOfConfig":"76"},{"size":1617,"mtime":1666901217497,"results":"82","hashOfConfig":"76"},{"size":701,"mtime":1666901217498,"results":"83","hashOfConfig":"76"},{"size":557,"mtime":1666909013033,"results":"84","hashOfConfig":"76"},{"size":1674,"mtime":1666909765898,"results":"85","hashOfConfig":"76"},{"size":1506,"mtime":1666901217500,"results":"86","hashOfConfig":"76"},{"size":1216,"mtime":1667243469286,"results":"87","hashOfConfig":"76"},{"size":706,"mtime":1666906589152,"results":"88","hashOfConfig":"76"},{"size":3822,"mtime":1667245505029,"results":"89","hashOfConfig":"76"},{"size":1443,"mtime":1666901217502,"results":"90","hashOfConfig":"76"},{"size":3501,"mtime":1667336061181,"results":"91","hashOfConfig":"76"},{"size":1272,"mtime":1667266343718,"results":"92","hashOfConfig":"76"},{"size":530,"mtime":1666901217504,"results":"93","hashOfConfig":"76"},{"size":977,"mtime":1666901217505,"results":"94","hashOfConfig":"76"},{"size":1293,"mtime":1666901217505,"results":"95","hashOfConfig":"76"},{"size":3363,"mtime":1667243508744,"results":"96","hashOfConfig":"76"},{"size":1034,"mtime":1666901391894,"results":"97","hashOfConfig":"76"},{"size":648,"mtime":1666901217507,"results":"98","hashOfConfig":"76"},{"size":429,"mtime":1666900225601,"results":"99","hashOfConfig":"76"},{"size":2095,"mtime":1666901217508,"results":"100","hashOfConfig":"76"},{"size":2515,"mtime":1666901217509,"results":"101","hashOfConfig":"76"},{"size":1010,"mtime":1666909377506,"results":"102","hashOfConfig":"76"},{"size":959,"mtime":1666901217510,"results":"103","hashOfConfig":"76"},{"size":1300,"mtime":1666901217511,"results":"104","hashOfConfig":"76"},{"size":530,"mtime":1666901217511,"results":"105","hashOfConfig":"76"},{"size":1145,"mtime":1666901217511,"results":"106","hashOfConfig":"76"},{"size":1543,"mtime":1667245692042,"results":"107","hashOfConfig":"76"},{"size":152,"mtime":1666901217512,"results":"108","hashOfConfig":"76"},{"size":976,"mtime":1666901217513,"results":"109","hashOfConfig":"76"},{"size":1628,"mtime":1666901217513,"results":"110","hashOfConfig":"76"},{"size":777,"mtime":1666901217514,"results":"111","hashOfConfig":"76"},{"size":527,"mtime":1666901217515,"results":"112","hashOfConfig":"76"},{"size":1810,"mtime":1666901217515,"results":"113","hashOfConfig":"76"},{"size":1672,"mtime":1666901217516,"results":"114","hashOfConfig":"76"},{"size":577,"mtime":1666910433646,"results":"115","hashOfConfig":"76"},{"size":859,"mtime":1666909733301,"results":"116","hashOfConfig":"76"},{"size":832,"mtime":1666901217517,"results":"117","hashOfConfig":"76"},{"size":2163,"mtime":1666901217517,"results":"118","hashOfConfig":"76"},{"size":654,"mtime":1666901217496,"results":"119","hashOfConfig":"76"},{"size":1195,"mtime":1666923294384,"results":"120","hashOfConfig":"76"},{"size":2106,"mtime":1666901217498,"results":"121","hashOfConfig":"76"},{"size":3589,"mtime":1667243426349,"results":"122","hashOfConfig":"76"},{"size":917,"mtime":1666901217499,"results":"123","hashOfConfig":"76"},{"size":2254,"mtime":1667243443566,"results":"124","hashOfConfig":"76"},{"size":715,"mtime":1666901217501,"results":"125","hashOfConfig":"76"},{"size":541,"mtime":1667245537329,"results":"126","hashOfConfig":"76"},{"size":988,"mtime":1666901217503,"results":"127","hashOfConfig":"76"},{"size":636,"mtime":1667244943264,"results":"128","hashOfConfig":"76"},{"size":557,"mtime":1666901217504,"results":"129","hashOfConfig":"76"},{"size":474,"mtime":1666901217504,"results":"130","hashOfConfig":"76"},{"size":578,"mtime":1666901217506,"results":"131","hashOfConfig":"76"},{"size":1519,"mtime":1666901217507,"results":"132","hashOfConfig":"76"},{"size":595,"mtime":1667245260972,"results":"133","hashOfConfig":"76"},{"size":747,"mtime":1667245189503,"results":"134","hashOfConfig":"76"},{"size":1006,"mtime":1667245204826,"results":"135","hashOfConfig":"76"},{"size":1535,"mtime":1666901217509,"results":"136","hashOfConfig":"76"},{"size":1202,"mtime":1666923495584,"results":"137","hashOfConfig":"76"},{"size":770,"mtime":1666901217510,"results":"138","hashOfConfig":"76"},{"size":1116,"mtime":1666901217510,"results":"139","hashOfConfig":"76"},{"size":1270,"mtime":1666901217512,"results":"140","hashOfConfig":"76"},{"size":1080,"mtime":1666901217513,"results":"141","hashOfConfig":"76"},{"size":656,"mtime":1666901217514,"results":"142","hashOfConfig":"76"},{"size":695,"mtime":1667338167016,"results":"143","hashOfConfig":"76"},{"size":1607,"mtime":1667338167016,"results":"144","hashOfConfig":"76"},{"size":597,"mtime":1666901217517,"results":"145","hashOfConfig":"76"},{"size":1364,"mtime":1666901217517,"results":"146","hashOfConfig":"76"},{"size":7179,"mtime":1667340789161,"results":"147","hashOfConfig":"76"},{"size":2466,"mtime":1667340877427,"results":"148","hashOfConfig":"76"},{"size":612,"mtime":1667266401971,"results":"149","hashOfConfig":"76"},{"filePath":"150","messages":"151","suppressedMessages":"152","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1338ja8",{"filePath":"153","messages":"154","suppressedMessages":"155","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","suppressedMessages":"158","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","suppressedMessages":"161","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","suppressedMessages":"164","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"165","messages":"166","suppressedMessages":"167","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","suppressedMessages":"170","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"171","messages":"172","suppressedMessages":"173","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","suppressedMessages":"176","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","suppressedMessages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","suppressedMessages":"182","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"183","messages":"184","suppressedMessages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","suppressedMessages":"188","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"189","messages":"190","suppressedMessages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","suppressedMessages":"194","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"195","messages":"196","suppressedMessages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","suppressedMessages":"200","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"201","messages":"202","suppressedMessages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","suppressedMessages":"206","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"207","messages":"208","suppressedMessages":"209","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","suppressedMessages":"212","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"213","messages":"214","suppressedMessages":"215","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","suppressedMessages":"218","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"219","messages":"220","suppressedMessages":"221","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"222","messages":"223","suppressedMessages":"224","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"225","messages":"226","suppressedMessages":"227","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"228","messages":"229","suppressedMessages":"230","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"231","messages":"232","suppressedMessages":"233","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"234","messages":"235","suppressedMessages":"236","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"237","messages":"238","suppressedMessages":"239","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"240","messages":"241","suppressedMessages":"242","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"243","messages":"244","suppressedMessages":"245","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"246","messages":"247","suppressedMessages":"248","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"249","messages":"250","suppressedMessages":"251","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"252","messages":"253","suppressedMessages":"254","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"255","messages":"256","suppressedMessages":"257","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"258","messages":"259","suppressedMessages":"260","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"261","messages":"262","suppressedMessages":"263","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"264","messages":"265","suppressedMessages":"266","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"267","messages":"268","suppressedMessages":"269","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"270","messages":"271","suppressedMessages":"272","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"273","messages":"274","suppressedMessages":"275","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"276","messages":"277","suppressedMessages":"278","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"279","messages":"280","suppressedMessages":"281","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"282","messages":"283","suppressedMessages":"284","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"285","messages":"286","suppressedMessages":"287","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"288","messages":"289","suppressedMessages":"290","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"291","messages":"292","suppressedMessages":"293","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"294","messages":"295","suppressedMessages":"296","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"297","messages":"298","suppressedMessages":"299","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"300","messages":"301","suppressedMessages":"302","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"303","messages":"304","suppressedMessages":"305","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"306","messages":"307","suppressedMessages":"308","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"309","messages":"310","suppressedMessages":"311","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"312","messages":"313","suppressedMessages":"314","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"315","messages":"316","suppressedMessages":"317","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"318","messages":"319","suppressedMessages":"320","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"321","messages":"322","suppressedMessages":"323","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"324","messages":"325","suppressedMessages":"326","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"327","messages":"328","suppressedMessages":"329","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"330","messages":"331","suppressedMessages":"332","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"333","messages":"334","suppressedMessages":"335","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"336","messages":"337","suppressedMessages":"338","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"339","messages":"340","suppressedMessages":"341","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"342","messages":"343","suppressedMessages":"344","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"345","messages":"346","suppressedMessages":"347","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"348","messages":"349","suppressedMessages":"350","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"351","messages":"352","suppressedMessages":"353","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"354","messages":"355","suppressedMessages":"356","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"357","messages":"358","suppressedMessages":"359","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"360","messages":"361","suppressedMessages":"362","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"363","messages":"364","suppressedMessages":"365","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"366","messages":"367","suppressedMessages":"368","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"369","messages":"370","suppressedMessages":"371","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/TylorSteinberger/code/tylors/fx/src/Fx.ts",[],["372","373","374","375","376","377"],"/Users/TylorSteinberger/code/tylors/fx/src/_internal.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/combine.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/combine.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/continueWith.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/debounce.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/debounce.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/delay.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/delay.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/during.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMap.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMap.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/fromEffect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/hold.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/hold.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/index.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/merge.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/merge.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/multicast.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/multicast.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/orElse.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/periodic.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/periodic.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/provide.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/scheduled.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/since.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/slice.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/slice.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/snapshot.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/suspendSucceed.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/switchMap.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/switchMap.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/throttle.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/throttle.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/transform.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/until.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/until.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zip.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zip.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/continueWith.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/during.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterLoop.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterMap.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/filterMap.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/flatMapConcurrently.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/fromIterable.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapCause.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapCause.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/mapEffect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/orElse.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/provide.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runCollect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runDrain.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runObserve.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/runReduce.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/since.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipRepeats.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/skipWhile.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/snapshot.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/takeWhile.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/tapEffect.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/withEmitter.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/zipIterable.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/Subject.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/Subject.test.ts",[],[],"/Users/TylorSteinberger/code/tylors/fx/src/struct.ts",[],[],{"ruleId":"378","severity":1,"message":"379","line":22,"column":63,"nodeType":"380","messageId":"381","endLine":22,"endColumn":65,"suppressions":"382"},{"ruleId":"378","severity":1,"message":"383","line":22,"column":73,"nodeType":"380","messageId":"381","endLine":22,"endColumn":75,"suppressions":"384"},{"ruleId":"378","severity":1,"message":"385","line":23,"column":51,"nodeType":"380","messageId":"381","endLine":23,"endColumn":53,"suppressions":"386"},{"ruleId":"378","severity":1,"message":"383","line":23,"column":70,"nodeType":"380","messageId":"381","endLine":23,"endColumn":72,"suppressions":"387"},{"ruleId":"378","severity":1,"message":"385","line":24,"column":51,"nodeType":"380","messageId":"381","endLine":24,"endColumn":53,"suppressions":"388"},{"ruleId":"378","severity":1,"message":"379","line":24,"column":61,"nodeType":"380","messageId":"381","endLine":24,"endColumn":63,"suppressions":"389"},"@typescript-eslint/no-unused-vars","'_E' is defined but never used.","Identifier","unusedVar",["390"],"'_A' is defined but never used.",["391"],"'_R' is defined but never used.",["392"],["393"],["394"],["395"],{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},{"kind":"396","justification":"397"},"directive",""]
|
package/cjs/Subject.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Cause } from '@effect/core/io/Cause';
|
|
2
|
+
import * as Effect from '@effect/core/io/Effect';
|
|
2
3
|
import * as Ref from '@effect/core/io/Ref';
|
|
3
4
|
import { LazyArg } from '@tsplus/stdlib/data/Function';
|
|
4
5
|
import * as Maybe from '@tsplus/stdlib/data/Maybe';
|
|
@@ -13,14 +14,20 @@ export interface UnsafeEmitter<E, A> {
|
|
|
13
14
|
export declare namespace Subject {
|
|
14
15
|
const unsafeMake: <E, A>() => Subject<E, A>;
|
|
15
16
|
}
|
|
16
|
-
export interface HoldSubject<E, A> extends Subject<E, A
|
|
17
|
+
export interface HoldSubject<E, A> extends Subject<E, A> {
|
|
18
|
+
readonly get: Effect.Effect<never, never, Maybe.Maybe<A>>;
|
|
17
19
|
}
|
|
18
20
|
export declare namespace HoldSubject {
|
|
19
21
|
const unsafeMake: <E, A>() => HoldSubject<E, A>;
|
|
20
22
|
}
|
|
21
|
-
export interface
|
|
23
|
+
export interface RefSubject<E, A> extends Subject<E, A>, Ref.Ref<A> {
|
|
22
24
|
}
|
|
23
|
-
export declare namespace
|
|
24
|
-
const unsafeMake: <E, A>(initial: LazyArg<A>) =>
|
|
25
|
+
export declare namespace RefSubject {
|
|
26
|
+
const unsafeMake: <E, A>(initial: LazyArg<A>) => RefSubject<E, A>;
|
|
27
|
+
}
|
|
28
|
+
export interface SynchronizedSubject<E, A> extends RefSubject<E, A>, Ref.Ref.Synchronized<A> {
|
|
29
|
+
}
|
|
30
|
+
export declare namespace SynchronizedSubject {
|
|
31
|
+
const unsafeMake: <E, A>(initial: LazyArg<A>) => SynchronizedSubject<E, A>;
|
|
25
32
|
}
|
|
26
33
|
//# sourceMappingURL=Subject.d.ts.map
|
package/cjs/Subject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subject.d.ts","sourceRoot":"","sources":["../src/Subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Subject.d.ts","sourceRoot":"","sources":["../src/Subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAK1C,OAAO,EAAE,OAAO,EAAQ,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAKrC,MAAM,WAAW,OAAO,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC;CAAG;AAEpG,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;IACnC,QAAQ,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IACnD,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAA;CAC/B;AAQD,yBAAiB,OAAO,CAAC;IAChB,MAAM,UAAU,2BAatB,CAAA;CACF;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IACtD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1D;AAED,yBAAiB,WAAW,CAAC;IACpB,MAAM,UAAU,+BActB,CAAA;CACF;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;CAAG;AAEtE,yBAAiB,UAAU,CAAC;IACnB,MAAM,UAAU,iDA+BtB,CAAA;CACF;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;CAAG;AAE/F,yBAAiB,mBAAmB,CAAC;IAC5B,MAAM,UAAU,0DAgBtB,CAAA;CACF"}
|
package/cjs/Subject.js
CHANGED
|
@@ -23,10 +23,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.SynchronizedSubject = exports.RefSubject = exports.HoldSubject = exports.Subject = void 0;
|
|
27
27
|
const Effect = __importStar(require("@effect/core/io/Effect"));
|
|
28
28
|
const Ref = __importStar(require("@effect/core/io/Ref"));
|
|
29
29
|
const AtomicInternal_1 = require("@effect/core/io/Ref/operations/_internal/AtomicInternal");
|
|
30
|
+
const SynchronizedInternal_1 = require("@effect/core/io/Ref/operations/_internal/SynchronizedInternal");
|
|
31
|
+
const TSemaphore = __importStar(require("@effect/core/stm/TSemaphore"));
|
|
30
32
|
const Function_1 = require("@fp-ts/data/Function");
|
|
31
33
|
const Function_2 = require("@tsplus/stdlib/data/Function");
|
|
32
34
|
const Maybe = __importStar(require("@tsplus/stdlib/data/Maybe"));
|
|
@@ -58,13 +60,12 @@ var HoldSubject;
|
|
|
58
60
|
(function (HoldSubject) {
|
|
59
61
|
HoldSubject.unsafeMake = () => {
|
|
60
62
|
const h = new hold_js_1.Hold(fromEffect_js_1.never);
|
|
61
|
-
const ref = new AtomicInternal_1.AtomicInternal(new AtomicInternal_1.UnsafeAPI(h.value));
|
|
62
63
|
return {
|
|
63
64
|
...FX_BRANDING,
|
|
64
|
-
|
|
65
|
-
run: h.run
|
|
66
|
-
emit: h.emit
|
|
67
|
-
failCause: h.failCause
|
|
65
|
+
get: Effect.sync(() => h.value.get),
|
|
66
|
+
run: (e) => h.run(e),
|
|
67
|
+
emit: (a) => h.emit(a),
|
|
68
|
+
failCause: (e) => h.failCause(e),
|
|
68
69
|
end: h.end,
|
|
69
70
|
unsafeEmit: (a) => Effect.unsafeRunAsync(h.emit(a)),
|
|
70
71
|
unsafeFailCause: (c) => Effect.unsafeRunAsync(h.failCause(c)),
|
|
@@ -72,17 +73,29 @@ var HoldSubject;
|
|
|
72
73
|
};
|
|
73
74
|
};
|
|
74
75
|
})(HoldSubject = exports.HoldSubject || (exports.HoldSubject = {}));
|
|
75
|
-
var
|
|
76
|
-
(function (
|
|
77
|
-
|
|
76
|
+
var RefSubject;
|
|
77
|
+
(function (RefSubject) {
|
|
78
|
+
RefSubject.unsafeMake = (initial) => {
|
|
78
79
|
const h = new hold_js_1.Hold(fromEffect_js_1.never);
|
|
79
80
|
const maybeRef = new AtomicInternal_1.AtomicInternal(new AtomicInternal_1.UnsafeAPI(h.value));
|
|
80
|
-
const ref = invmapRef(maybeRef, Maybe.getOrElse(initial), Maybe.some);
|
|
81
|
+
const ref = emitRefChanges(invmapRef(maybeRef, Maybe.getOrElse(initial), Maybe.some), h);
|
|
81
82
|
// Ensure there is always a value in the Ref
|
|
82
83
|
h.value.set(Maybe.some(initial()));
|
|
83
84
|
return {
|
|
84
85
|
...FX_BRANDING,
|
|
85
|
-
|
|
86
|
+
[Ref.RefSym]: Ref.RefSym,
|
|
87
|
+
[Ref._A]: (_) => _,
|
|
88
|
+
get: ref.get,
|
|
89
|
+
modify: (f) => ref.modify(f),
|
|
90
|
+
set: (a) => ref.set(a),
|
|
91
|
+
getAndSet: (a) => ref.getAndSet(a),
|
|
92
|
+
getAndUpdate: (f) => ref.getAndUpdate(f),
|
|
93
|
+
getAndUpdateSome: (f) => ref.getAndUpdateSome(f),
|
|
94
|
+
modifySome: (fallback, f) => ref.modifySome(fallback, f),
|
|
95
|
+
update: (f) => ref.update(f),
|
|
96
|
+
updateAndGet: (f) => ref.updateAndGet(f),
|
|
97
|
+
updateSome: (f) => ref.updateSome(f),
|
|
98
|
+
updateSomeAndGet: (f) => ref.updateSomeAndGet(f),
|
|
86
99
|
run: h.run.bind(h),
|
|
87
100
|
emit: h.emit.bind(h),
|
|
88
101
|
failCause: h.failCause.bind(h),
|
|
@@ -92,7 +105,26 @@ var BehaviorSubject;
|
|
|
92
105
|
unsafeEnd: () => Effect.unsafeRunAsync(h.end),
|
|
93
106
|
};
|
|
94
107
|
};
|
|
95
|
-
})(
|
|
108
|
+
})(RefSubject = exports.RefSubject || (exports.RefSubject = {}));
|
|
109
|
+
var SynchronizedSubject;
|
|
110
|
+
(function (SynchronizedSubject) {
|
|
111
|
+
SynchronizedSubject.unsafeMake = (initial) => {
|
|
112
|
+
const subject = RefSubject.unsafeMake(initial);
|
|
113
|
+
const synchronizedRef = new SynchronizedInternal_1.SynchronizedInternal(subject, TSemaphore.unsafeMake(1));
|
|
114
|
+
return {
|
|
115
|
+
...subject,
|
|
116
|
+
[Ref.SynchronizedSym]: Ref.SynchronizedSym,
|
|
117
|
+
modifyEffect: (f) => synchronizedRef.modifyEffect(f),
|
|
118
|
+
modifySomeEffect: (fallback, f) => synchronizedRef.modifySomeEffect(fallback, f),
|
|
119
|
+
getAndUpdateEffect: (f) => synchronizedRef.getAndUpdateEffect(f),
|
|
120
|
+
getAndUpdateSomeEffect: (f) => synchronizedRef.getAndUpdateSomeEffect(f),
|
|
121
|
+
updateEffect: (f) => synchronizedRef.updateEffect(f),
|
|
122
|
+
updateAndGetEffect: (f) => synchronizedRef.updateAndGetEffect(f),
|
|
123
|
+
updateSomeEffect: (f) => synchronizedRef.updateSomeEffect(f),
|
|
124
|
+
updateSomeAndGetEffect: (f) => synchronizedRef.updateSomeAndGetEffect(f),
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
})(SynchronizedSubject = exports.SynchronizedSubject || (exports.SynchronizedSubject = {}));
|
|
96
128
|
function invmapRef(ref, to, from) {
|
|
97
129
|
const get = (0, Function_2.pipe)(ref.get, Effect.map(to));
|
|
98
130
|
const modify = (f) => ref.modify((a) => {
|
|
@@ -124,4 +156,22 @@ function invmapRef(ref, to, from) {
|
|
|
124
156
|
updateSomeAndGet,
|
|
125
157
|
};
|
|
126
158
|
}
|
|
159
|
+
function emitRefChanges(ref, subject) {
|
|
160
|
+
const andEmitLatestValue = Effect.zipLeft((0, Function_2.pipe)(ref.get, Effect.flatMap(subject.emit)));
|
|
161
|
+
return {
|
|
162
|
+
[Ref.RefSym]: Ref.RefSym,
|
|
163
|
+
[Ref._A]: (_) => _,
|
|
164
|
+
get: ref.get,
|
|
165
|
+
modify: (f) => (0, Function_2.pipe)(ref.modify(f), andEmitLatestValue),
|
|
166
|
+
set: (a) => (0, Function_2.pipe)(ref.set(a), andEmitLatestValue),
|
|
167
|
+
getAndSet: (a) => (0, Function_2.pipe)(ref.getAndSet(a), andEmitLatestValue),
|
|
168
|
+
getAndUpdate: (f) => (0, Function_2.pipe)(ref.getAndUpdate(f), andEmitLatestValue),
|
|
169
|
+
getAndUpdateSome: (f) => (0, Function_2.pipe)(ref.getAndUpdateSome(f), andEmitLatestValue),
|
|
170
|
+
modifySome: (fallback, f) => (0, Function_2.pipe)(ref.modifySome(fallback, f), andEmitLatestValue),
|
|
171
|
+
update: (f) => (0, Function_2.pipe)(ref.update(f), andEmitLatestValue),
|
|
172
|
+
updateAndGet: (f) => (0, Function_2.pipe)(ref.updateAndGet(f), andEmitLatestValue),
|
|
173
|
+
updateSome: (f) => (0, Function_2.pipe)(ref.updateSome(f), andEmitLatestValue),
|
|
174
|
+
updateSomeAndGet: (f) => (0, Function_2.pipe)(ref.updateSomeAndGet(f), andEmitLatestValue),
|
|
175
|
+
};
|
|
176
|
+
}
|
|
127
177
|
//# sourceMappingURL=Subject.js.map
|
package/cjs/Subject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../src/Subject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+DAAgD;AAChD,yDAA0C;AAC1C,4FAAmG;AACnG,mDAA2C;AAC3C,2DAA4D;AAC5D,iEAAkD;AAGlD,mDAAuC;AACvC,uCAAgC;AAChC,iDAA0C;AAU1C,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAU;IACzB,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAQ;IACvB,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAQ;CACxB,CAAA;AAED,IAAiB,OAAO,CAevB;AAfD,WAAiB,OAAO;IACT,kBAAU,GAAG,GAAwB,EAAE;QAClD,MAAM,CAAC,GAAG,IAAI,wBAAS,CAAc,qBAAK,CAAC,CAAA;QAE3C,OAAO;YACL,GAAG,WAAW;YACd,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CA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AI,EAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAClF,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;QACtD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAClE,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAC9D,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;KAC3E,CAAA;AACH,CAAC"}
|
package/esm/Subject.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Cause } from '@effect/core/io/Cause';
|
|
2
|
+
import * as Effect from '@effect/core/io/Effect';
|
|
2
3
|
import * as Ref from '@effect/core/io/Ref';
|
|
3
4
|
import { LazyArg } from '@tsplus/stdlib/data/Function';
|
|
4
5
|
import * as Maybe from '@tsplus/stdlib/data/Maybe';
|
|
@@ -13,14 +14,20 @@ export interface UnsafeEmitter<E, A> {
|
|
|
13
14
|
export declare namespace Subject {
|
|
14
15
|
const unsafeMake: <E, A>() => Subject<E, A>;
|
|
15
16
|
}
|
|
16
|
-
export interface HoldSubject<E, A> extends Subject<E, A
|
|
17
|
+
export interface HoldSubject<E, A> extends Subject<E, A> {
|
|
18
|
+
readonly get: Effect.Effect<never, never, Maybe.Maybe<A>>;
|
|
17
19
|
}
|
|
18
20
|
export declare namespace HoldSubject {
|
|
19
21
|
const unsafeMake: <E, A>() => HoldSubject<E, A>;
|
|
20
22
|
}
|
|
21
|
-
export interface
|
|
23
|
+
export interface RefSubject<E, A> extends Subject<E, A>, Ref.Ref<A> {
|
|
22
24
|
}
|
|
23
|
-
export declare namespace
|
|
24
|
-
const unsafeMake: <E, A>(initial: LazyArg<A>) =>
|
|
25
|
+
export declare namespace RefSubject {
|
|
26
|
+
const unsafeMake: <E, A>(initial: LazyArg<A>) => RefSubject<E, A>;
|
|
27
|
+
}
|
|
28
|
+
export interface SynchronizedSubject<E, A> extends RefSubject<E, A>, Ref.Ref.Synchronized<A> {
|
|
29
|
+
}
|
|
30
|
+
export declare namespace SynchronizedSubject {
|
|
31
|
+
const unsafeMake: <E, A>(initial: LazyArg<A>) => SynchronizedSubject<E, A>;
|
|
25
32
|
}
|
|
26
33
|
//# sourceMappingURL=Subject.d.ts.map
|
package/esm/Subject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subject.d.ts","sourceRoot":"","sources":["../src/Subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Subject.d.ts","sourceRoot":"","sources":["../src/Subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAK1C,OAAO,EAAE,OAAO,EAAQ,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAKrC,MAAM,WAAW,OAAO,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,CA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eAPI } from '@effect/core/io/Ref/operations/_internal/AtomicInternal';
|
|
4
|
+
import { SynchronizedInternal } from '@effect/core/io/Ref/operations/_internal/SynchronizedInternal';
|
|
5
|
+
import * as TSemaphore from '@effect/core/stm/TSemaphore';
|
|
4
6
|
import { flow } from '@fp-ts/data/Function';
|
|
5
7
|
import { pipe } from '@tsplus/stdlib/data/Function';
|
|
6
8
|
import * as Maybe from '@tsplus/stdlib/data/Maybe';
|
|
@@ -32,13 +34,12 @@ export var HoldSubject;
|
|
|
32
34
|
(function (HoldSubject) {
|
|
33
35
|
HoldSubject.unsafeMake = () => {
|
|
34
36
|
const h = new Hold(never);
|
|
35
|
-
const ref = new AtomicInternal(new UnsafeAPI(h.value));
|
|
36
37
|
return {
|
|
37
38
|
...FX_BRANDING,
|
|
38
|
-
|
|
39
|
-
run: h.run
|
|
40
|
-
emit: h.emit
|
|
41
|
-
failCause: h.failCause
|
|
39
|
+
get: Effect.sync(() => h.value.get),
|
|
40
|
+
run: (e) => h.run(e),
|
|
41
|
+
emit: (a) => h.emit(a),
|
|
42
|
+
failCause: (e) => h.failCause(e),
|
|
42
43
|
end: h.end,
|
|
43
44
|
unsafeEmit: (a) => Effect.unsafeRunAsync(h.emit(a)),
|
|
44
45
|
unsafeFailCause: (c) => Effect.unsafeRunAsync(h.failCause(c)),
|
|
@@ -46,17 +47,29 @@ export var HoldSubject;
|
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
49
|
})(HoldSubject || (HoldSubject = {}));
|
|
49
|
-
export var
|
|
50
|
-
(function (
|
|
51
|
-
|
|
50
|
+
export var RefSubject;
|
|
51
|
+
(function (RefSubject) {
|
|
52
|
+
RefSubject.unsafeMake = (initial) => {
|
|
52
53
|
const h = new Hold(never);
|
|
53
54
|
const maybeRef = new AtomicInternal(new UnsafeAPI(h.value));
|
|
54
|
-
const ref = invmapRef(maybeRef, Maybe.getOrElse(initial), Maybe.some);
|
|
55
|
+
const ref = emitRefChanges(invmapRef(maybeRef, Maybe.getOrElse(initial), Maybe.some), h);
|
|
55
56
|
// Ensure there is always a value in the Ref
|
|
56
57
|
h.value.set(Maybe.some(initial()));
|
|
57
58
|
return {
|
|
58
59
|
...FX_BRANDING,
|
|
59
|
-
|
|
60
|
+
[Ref.RefSym]: Ref.RefSym,
|
|
61
|
+
[Ref._A]: (_) => _,
|
|
62
|
+
get: ref.get,
|
|
63
|
+
modify: (f) => ref.modify(f),
|
|
64
|
+
set: (a) => ref.set(a),
|
|
65
|
+
getAndSet: (a) => ref.getAndSet(a),
|
|
66
|
+
getAndUpdate: (f) => ref.getAndUpdate(f),
|
|
67
|
+
getAndUpdateSome: (f) => ref.getAndUpdateSome(f),
|
|
68
|
+
modifySome: (fallback, f) => ref.modifySome(fallback, f),
|
|
69
|
+
update: (f) => ref.update(f),
|
|
70
|
+
updateAndGet: (f) => ref.updateAndGet(f),
|
|
71
|
+
updateSome: (f) => ref.updateSome(f),
|
|
72
|
+
updateSomeAndGet: (f) => ref.updateSomeAndGet(f),
|
|
60
73
|
run: h.run.bind(h),
|
|
61
74
|
emit: h.emit.bind(h),
|
|
62
75
|
failCause: h.failCause.bind(h),
|
|
@@ -66,7 +79,26 @@ export var BehaviorSubject;
|
|
|
66
79
|
unsafeEnd: () => Effect.unsafeRunAsync(h.end),
|
|
67
80
|
};
|
|
68
81
|
};
|
|
69
|
-
})(
|
|
82
|
+
})(RefSubject || (RefSubject = {}));
|
|
83
|
+
export var SynchronizedSubject;
|
|
84
|
+
(function (SynchronizedSubject) {
|
|
85
|
+
SynchronizedSubject.unsafeMake = (initial) => {
|
|
86
|
+
const subject = RefSubject.unsafeMake(initial);
|
|
87
|
+
const synchronizedRef = new SynchronizedInternal(subject, TSemaphore.unsafeMake(1));
|
|
88
|
+
return {
|
|
89
|
+
...subject,
|
|
90
|
+
[Ref.SynchronizedSym]: Ref.SynchronizedSym,
|
|
91
|
+
modifyEffect: (f) => synchronizedRef.modifyEffect(f),
|
|
92
|
+
modifySomeEffect: (fallback, f) => synchronizedRef.modifySomeEffect(fallback, f),
|
|
93
|
+
getAndUpdateEffect: (f) => synchronizedRef.getAndUpdateEffect(f),
|
|
94
|
+
getAndUpdateSomeEffect: (f) => synchronizedRef.getAndUpdateSomeEffect(f),
|
|
95
|
+
updateEffect: (f) => synchronizedRef.updateEffect(f),
|
|
96
|
+
updateAndGetEffect: (f) => synchronizedRef.updateAndGetEffect(f),
|
|
97
|
+
updateSomeEffect: (f) => synchronizedRef.updateSomeEffect(f),
|
|
98
|
+
updateSomeAndGetEffect: (f) => synchronizedRef.updateSomeAndGetEffect(f),
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
})(SynchronizedSubject || (SynchronizedSubject = {}));
|
|
70
102
|
function invmapRef(ref, to, from) {
|
|
71
103
|
const get = pipe(ref.get, Effect.map(to));
|
|
72
104
|
const modify = (f) => ref.modify((a) => {
|
|
@@ -98,4 +130,22 @@ function invmapRef(ref, to, from) {
|
|
|
98
130
|
updateSomeAndGet,
|
|
99
131
|
};
|
|
100
132
|
}
|
|
133
|
+
function emitRefChanges(ref, subject) {
|
|
134
|
+
const andEmitLatestValue = Effect.zipLeft(pipe(ref.get, Effect.flatMap(subject.emit)));
|
|
135
|
+
return {
|
|
136
|
+
[Ref.RefSym]: Ref.RefSym,
|
|
137
|
+
[Ref._A]: (_) => _,
|
|
138
|
+
get: ref.get,
|
|
139
|
+
modify: (f) => pipe(ref.modify(f), andEmitLatestValue),
|
|
140
|
+
set: (a) => pipe(ref.set(a), andEmitLatestValue),
|
|
141
|
+
getAndSet: (a) => pipe(ref.getAndSet(a), andEmitLatestValue),
|
|
142
|
+
getAndUpdate: (f) => pipe(ref.getAndUpdate(f), andEmitLatestValue),
|
|
143
|
+
getAndUpdateSome: (f) => pipe(ref.getAndUpdateSome(f), andEmitLatestValue),
|
|
144
|
+
modifySome: (fallback, f) => pipe(ref.modifySome(fallback, f), andEmitLatestValue),
|
|
145
|
+
update: (f) => pipe(ref.update(f), andEmitLatestValue),
|
|
146
|
+
updateAndGet: (f) => pipe(ref.updateAndGet(f), andEmitLatestValue),
|
|
147
|
+
updateSome: (f) => pipe(ref.updateSome(f), andEmitLatestValue),
|
|
148
|
+
updateSomeAndGet: (f) => pipe(ref.updateSomeAndGet(f), andEmitLatestValue),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
101
151
|
//# sourceMappingURL=Subject.js.map
|
package/esm/Subject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../src/Subject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAA;AACnG,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAW,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAA;AAGlD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAU1C,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAU;IACzB,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAQ;IACvB,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAQ;CACxB,CAAA;AAED,MAAM,KAAW,OAAO,CAevB;AAfD,WAAiB,OAAO;IACT,kBAAU,GAAG,GAAwB,EAAE;QAClD,MAAM,CAAC,GAAG,IAAI,SAAS,CAAc,KAAK,CAAC,CAAA;QAE3C,OAAO;YACL,GAAG,WAAW;YACd,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,IAAI,EA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CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAC1E,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAClF,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;QACtD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAClE,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;QAC9D,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC;KAC3E,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
package/src/Subject.test.ts
CHANGED
|
@@ -26,10 +26,10 @@ describe(import.meta.url, () => {
|
|
|
26
26
|
})
|
|
27
27
|
})
|
|
28
28
|
|
|
29
|
-
describe('
|
|
29
|
+
describe('RefSubject', () => {
|
|
30
30
|
it('creates a Ref to sample the current value of the stream', async () => {
|
|
31
31
|
const test = Effect.gen(function* ($) {
|
|
32
|
-
const subject = Fx.
|
|
32
|
+
const subject = Fx.RefSubject.unsafeMake<never, number>(() => 1)
|
|
33
33
|
const fiber = yield* $(
|
|
34
34
|
pipe(
|
|
35
35
|
subject,
|
|
@@ -63,5 +63,33 @@ describe(import.meta.url, () => {
|
|
|
63
63
|
|
|
64
64
|
await Effect.unsafeRunPromise(test)
|
|
65
65
|
})
|
|
66
|
+
|
|
67
|
+
it('emits values when ref is updated', async () => {
|
|
68
|
+
const test = Effect.gen(function* ($) {
|
|
69
|
+
const subject = Fx.RefSubject.unsafeMake<never, number>(() => 1)
|
|
70
|
+
const fiber = yield* $(
|
|
71
|
+
pipe(
|
|
72
|
+
subject,
|
|
73
|
+
Fx.map((n) => n * 2),
|
|
74
|
+
Fx.filter((x) => x % 2 === 0),
|
|
75
|
+
Fx.runCollect,
|
|
76
|
+
Effect.fork,
|
|
77
|
+
),
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
deepStrictEqual(yield* $(subject.get), 1)
|
|
81
|
+
|
|
82
|
+
yield* $(subject.update((x) => x + 1))
|
|
83
|
+
yield* $(subject.update((x) => x + 1))
|
|
84
|
+
yield* $(subject.update((x) => x + 1))
|
|
85
|
+
yield* $(subject.end)
|
|
86
|
+
|
|
87
|
+
const events = yield* $(Fiber.join(fiber))
|
|
88
|
+
|
|
89
|
+
deepStrictEqual(events, [4, 6, 8])
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
await Effect.unsafeRunPromise(test)
|
|
93
|
+
})
|
|
66
94
|
})
|
|
67
95
|
})
|
package/src/Subject.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { Cause } from '@effect/core/io/Cause'
|
|
|
2
2
|
import * as Effect from '@effect/core/io/Effect'
|
|
3
3
|
import * as Ref from '@effect/core/io/Ref'
|
|
4
4
|
import { AtomicInternal, UnsafeAPI } from '@effect/core/io/Ref/operations/_internal/AtomicInternal'
|
|
5
|
+
import { SynchronizedInternal } from '@effect/core/io/Ref/operations/_internal/SynchronizedInternal'
|
|
6
|
+
import * as TSemaphore from '@effect/core/stm/TSemaphore'
|
|
5
7
|
import { flow } from '@fp-ts/data/Function'
|
|
6
8
|
import { LazyArg, pipe } from '@tsplus/stdlib/data/Function'
|
|
7
9
|
import * as Maybe from '@tsplus/stdlib/data/Maybe'
|
|
@@ -42,19 +44,20 @@ export namespace Subject {
|
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
export interface HoldSubject<E, A> extends Subject<E, A
|
|
47
|
+
export interface HoldSubject<E, A> extends Subject<E, A> {
|
|
48
|
+
readonly get: Effect.Effect<never, never, Maybe.Maybe<A>>
|
|
49
|
+
}
|
|
46
50
|
|
|
47
51
|
export namespace HoldSubject {
|
|
48
52
|
export const unsafeMake = <E, A>(): HoldSubject<E, A> => {
|
|
49
53
|
const h = new Hold<never, E, A>(never)
|
|
50
|
-
const ref: Ref.Ref<Maybe.Maybe<A>> = new AtomicInternal(new UnsafeAPI(h.value))
|
|
51
54
|
|
|
52
55
|
return {
|
|
53
56
|
...FX_BRANDING,
|
|
54
|
-
|
|
55
|
-
run: h.run
|
|
56
|
-
emit: h.emit
|
|
57
|
-
failCause: h.failCause
|
|
57
|
+
get: Effect.sync(() => h.value.get),
|
|
58
|
+
run: (e) => h.run(e),
|
|
59
|
+
emit: (a) => h.emit(a),
|
|
60
|
+
failCause: (e) => h.failCause(e),
|
|
58
61
|
end: h.end,
|
|
59
62
|
unsafeEmit: (a) => Effect.unsafeRunAsync(h.emit(a)),
|
|
60
63
|
unsafeFailCause: (c) => Effect.unsafeRunAsync(h.failCause(c)),
|
|
@@ -63,20 +66,32 @@ export namespace HoldSubject {
|
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
export interface
|
|
69
|
+
export interface RefSubject<E, A> extends Subject<E, A>, Ref.Ref<A> {}
|
|
67
70
|
|
|
68
|
-
export namespace
|
|
69
|
-
export const unsafeMake = <E, A>(initial: LazyArg<A>):
|
|
71
|
+
export namespace RefSubject {
|
|
72
|
+
export const unsafeMake = <E, A>(initial: LazyArg<A>): RefSubject<E, A> => {
|
|
70
73
|
const h = new Hold<never, E, A>(never)
|
|
71
74
|
const maybeRef: Ref.Ref<Maybe.Maybe<A>> = new AtomicInternal(new UnsafeAPI(h.value))
|
|
72
|
-
const ref = invmapRef(maybeRef, Maybe.getOrElse(initial), Maybe.some)
|
|
75
|
+
const ref = emitRefChanges(invmapRef(maybeRef, Maybe.getOrElse(initial), Maybe.some), h)
|
|
73
76
|
|
|
74
77
|
// Ensure there is always a value in the Ref
|
|
75
78
|
h.value.set(Maybe.some(initial()))
|
|
76
79
|
|
|
77
80
|
return {
|
|
78
81
|
...FX_BRANDING,
|
|
79
|
-
|
|
82
|
+
[Ref.RefSym]: Ref.RefSym,
|
|
83
|
+
[Ref._A]: (_) => _,
|
|
84
|
+
get: ref.get,
|
|
85
|
+
modify: (f) => ref.modify(f),
|
|
86
|
+
set: (a) => ref.set(a),
|
|
87
|
+
getAndSet: (a) => ref.getAndSet(a),
|
|
88
|
+
getAndUpdate: (f) => ref.getAndUpdate(f),
|
|
89
|
+
getAndUpdateSome: (f) => ref.getAndUpdateSome(f),
|
|
90
|
+
modifySome: (fallback, f) => ref.modifySome(fallback, f),
|
|
91
|
+
update: (f) => ref.update(f),
|
|
92
|
+
updateAndGet: (f) => ref.updateAndGet(f),
|
|
93
|
+
updateSome: (f) => ref.updateSome(f),
|
|
94
|
+
updateSomeAndGet: (f) => ref.updateSomeAndGet(f),
|
|
80
95
|
run: h.run.bind(h),
|
|
81
96
|
emit: h.emit.bind(h),
|
|
82
97
|
failCause: h.failCause.bind(h),
|
|
@@ -88,6 +103,28 @@ export namespace BehaviorSubject {
|
|
|
88
103
|
}
|
|
89
104
|
}
|
|
90
105
|
|
|
106
|
+
export interface SynchronizedSubject<E, A> extends RefSubject<E, A>, Ref.Ref.Synchronized<A> {}
|
|
107
|
+
|
|
108
|
+
export namespace SynchronizedSubject {
|
|
109
|
+
export const unsafeMake = <E, A>(initial: LazyArg<A>): SynchronizedSubject<E, A> => {
|
|
110
|
+
const subject = RefSubject.unsafeMake<E, A>(initial)
|
|
111
|
+
const synchronizedRef = new SynchronizedInternal(subject, TSemaphore.unsafeMake(1))
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
...subject,
|
|
115
|
+
[Ref.SynchronizedSym]: Ref.SynchronizedSym,
|
|
116
|
+
modifyEffect: (f) => synchronizedRef.modifyEffect(f),
|
|
117
|
+
modifySomeEffect: (fallback, f) => synchronizedRef.modifySomeEffect(fallback, f),
|
|
118
|
+
getAndUpdateEffect: (f) => synchronizedRef.getAndUpdateEffect(f),
|
|
119
|
+
getAndUpdateSomeEffect: (f) => synchronizedRef.getAndUpdateSomeEffect(f),
|
|
120
|
+
updateEffect: (f) => synchronizedRef.updateEffect(f),
|
|
121
|
+
updateAndGetEffect: (f) => synchronizedRef.updateAndGetEffect(f),
|
|
122
|
+
updateSomeEffect: (f) => synchronizedRef.updateSomeEffect(f),
|
|
123
|
+
updateSomeAndGetEffect: (f) => synchronizedRef.updateSomeAndGetEffect(f),
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
91
128
|
function invmapRef<A, B>(ref: Ref.Ref<A>, to: (a: A) => B, from: (b: B) => A): Ref.Ref<B> {
|
|
92
129
|
const get: Ref.Ref<B>['get'] = pipe(ref.get, Effect.map(to))
|
|
93
130
|
|
|
@@ -143,3 +180,23 @@ function invmapRef<A, B>(ref: Ref.Ref<A>, to: (a: A) => B, from: (b: B) => A): R
|
|
|
143
180
|
updateSomeAndGet,
|
|
144
181
|
}
|
|
145
182
|
}
|
|
183
|
+
|
|
184
|
+
function emitRefChanges<A, E>(ref: Ref.Ref<A>, subject: Emitter<never, E, A>): Ref.Ref<A> {
|
|
185
|
+
const andEmitLatestValue = Effect.zipLeft(pipe(ref.get, Effect.flatMap(subject.emit)))
|
|
186
|
+
|
|
187
|
+
return {
|
|
188
|
+
[Ref.RefSym]: Ref.RefSym,
|
|
189
|
+
[Ref._A]: (_) => _,
|
|
190
|
+
get: ref.get,
|
|
191
|
+
modify: (f) => pipe(ref.modify(f), andEmitLatestValue),
|
|
192
|
+
set: (a) => pipe(ref.set(a), andEmitLatestValue),
|
|
193
|
+
getAndSet: (a) => pipe(ref.getAndSet(a), andEmitLatestValue),
|
|
194
|
+
getAndUpdate: (f) => pipe(ref.getAndUpdate(f), andEmitLatestValue),
|
|
195
|
+
getAndUpdateSome: (f) => pipe(ref.getAndUpdateSome(f), andEmitLatestValue),
|
|
196
|
+
modifySome: (fallback, f) => pipe(ref.modifySome(fallback, f), andEmitLatestValue),
|
|
197
|
+
update: (f) => pipe(ref.update(f), andEmitLatestValue),
|
|
198
|
+
updateAndGet: (f) => pipe(ref.updateAndGet(f), andEmitLatestValue),
|
|
199
|
+
updateSome: (f) => pipe(ref.updateSome(f), andEmitLatestValue),
|
|
200
|
+
updateSomeAndGet: (f) => pipe(ref.updateSomeAndGet(f), andEmitLatestValue),
|
|
201
|
+
}
|
|
202
|
+
}
|