@fossa-app/bridge 0.1.6 → 0.1.8
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/dist/Models/ApiModels.d.ts +199 -0
- package/dist/Models/ApiModels.js +350 -0
- package/dist/Models/ApiModels.js.map +1 -0
- package/dist/Services/Clients/BranchClient.d.ts +16 -0
- package/dist/Services/Clients/BranchClient.js +54 -0
- package/dist/Services/Clients/BranchClient.js.map +1 -0
- package/dist/Services/Clients/CompanyClient.d.ts +13 -0
- package/dist/Services/Clients/CompanyClient.js +38 -0
- package/dist/Services/Clients/CompanyClient.js.map +1 -0
- package/dist/Services/Clients/CompanyLicenseClient.d.ts +10 -0
- package/dist/Services/Clients/CompanyLicenseClient.js +30 -0
- package/dist/Services/Clients/CompanyLicenseClient.js.map +1 -0
- package/dist/Services/Clients/CompanySettingsClient.d.ts +13 -0
- package/dist/Services/Clients/CompanySettingsClient.js +38 -0
- package/dist/Services/Clients/CompanySettingsClient.js.map +1 -0
- package/dist/Services/Clients/DepartmentClient.d.ts +16 -0
- package/dist/Services/Clients/DepartmentClient.js +54 -0
- package/dist/Services/Clients/DepartmentClient.js.map +1 -0
- package/dist/Services/Clients/EmployeeClient.d.ts +18 -0
- package/dist/Services/Clients/EmployeeClient.js +63 -0
- package/dist/Services/Clients/EmployeeClient.js.map +1 -0
- package/dist/Services/Clients/IdentityClient.d.ts +9 -0
- package/dist/Services/Clients/IdentityClient.js +26 -0
- package/dist/Services/Clients/IdentityClient.js.map +1 -0
- package/dist/Services/Clients/SystemLicenseClient.d.ts +9 -0
- package/dist/Services/Clients/SystemLicenseClient.js +26 -0
- package/dist/Services/Clients/SystemLicenseClient.js.map +1 -0
- package/dist/Services/Endpoints.d.ts +10 -0
- package/dist/Services/Endpoints.js +14 -0
- package/dist/Services/Endpoints.js.map +1 -0
- package/dist/Services/IHttpTransport.d.ts +6 -0
- package/dist/Services/IHttpTransport.js +3 -0
- package/dist/Services/IHttpTransport.js.map +1 -0
- package/dist/Services/UrlHelpers.d.ts +25 -0
- package/dist/Services/UrlHelpers.js +103 -0
- package/dist/Services/UrlHelpers.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.d.ts +125 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.js +1371 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.d.ts +27 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.js +172 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.d.ts +59 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.js +194 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.d.ts +129 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.js +428 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.d.ts +27 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.js +165 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.d.ts +3 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.js +27 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.d.ts +66 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.js +271 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.d.ts +121 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.js +231 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.d.ts +8 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.js +192 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.d.ts +9 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.js +26 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.d.ts +70 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.js +812 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.d.ts +65 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.js +345 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.d.ts +18 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.js +143 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.d.ts +63 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.js +322 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.d.ts +11 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.js +60 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.js +178 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.d.ts +31 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.js +109 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.d.ts +7 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.js +53 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.js +38 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.d.ts +30 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.js +185 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.d.ts +45 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.js +33 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.d.ts +10 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.js +152 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.d.ts +29 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.js +148 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.d.ts +143 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.js +1404 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.d.ts +3 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.js +52 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.d.ts +25 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.js +104 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.d.ts +178 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.js +1525 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.js +141 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.d.ts +52 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.js +355 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.d.ts +39 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.js +246 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.d.ts +3 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.js +18 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.d.ts +20 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.js +87 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.d.ts +32 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.js +128 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.d.ts +29 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.js +127 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.d.ts +38 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.js +186 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.js +56 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.d.ts +119 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.js +529 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.d.ts +10 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.js +144 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.d.ts +38 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.js +191 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.d.ts +164 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.js +1501 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.d.ts +18 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.js +129 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.d.ts +190 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.js +1931 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.d.ts +59 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.js +677 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.d.ts +85 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.js +390 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.d.ts +40 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.js +204 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.d.ts +121 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.js +367 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.d.ts +15 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.js +138 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.d.ts +35 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.js +210 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.d.ts +19 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.js +72 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.d.ts +51 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.js +205 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.d.ts +2 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.js +8 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.d.ts +32 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.js +170 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.d.ts +243 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.js +903 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.js.map +1 -0
- package/package.json +5 -2
- package/.build.ps1 +0 -308
- package/.gitattributes +0 -43
- package/.github/dependabot.yml +0 -38
- package/.github/release-drafter.yml +0 -52
- package/.github/workflows/cicd.yml +0 -87
- package/.github/workflows/lint.yml +0 -34
- package/.github/workflows/release-drafter.yml +0 -27
- package/Bridge.slnx +0 -8
- package/Directory.Build.props +0 -25
- package/Images/Icon.png +0 -0
- package/build.ps1 +0 -11
- package/dotnet-tools.json +0 -27
- package/format.ps1 +0 -11
- package/gig.ps1 +0 -17
- package/global.json +0 -6
- package/lint.ps1 +0 -20
- package/pack.ps1 +0 -11
- package/publish.ps1 +0 -11
- package/restore.ps1 +0 -11
- package/src/Bridge/Bridge.fsproj +0 -26
- package/src/Bridge/Models/ApiModels.fs +0 -142
- package/src/Bridge/Services/Clients/BranchClient.fs +0 -46
- package/src/Bridge/Services/Clients/CompanyClient.fs +0 -24
- package/src/Bridge/Services/Clients/CompanyLicenseClient.fs +0 -17
- package/src/Bridge/Services/Clients/CompanySettingsClient.fs +0 -24
- package/src/Bridge/Services/Clients/DepartmentClient.fs +0 -48
- package/src/Bridge/Services/Clients/EmployeeClient.fs +0 -71
- package/src/Bridge/Services/Clients/IdentityClient.fs +0 -11
- package/src/Bridge/Services/Clients/SystemLicenseClient.fs +0 -11
- package/src/Bridge/Services/Endpoints.fs +0 -13
- package/src/Bridge/Services/IHttpTransport.fs +0 -10
- package/src/Bridge/Services/UrlHelpers.fs +0 -18
- package/src/Bridge/bin/Release/net10.0/Fossa.Bridge.deps.json +0 -98
- package/src/Bridge/bin/Release/net10.0/Fossa.Bridge.xml +0 -6
- package/src/Bridge/obj/Bridge.fsproj.nuget.dgspec.json +0 -357
- package/src/Bridge/obj/Bridge.fsproj.nuget.g.props +0 -29
- package/src/Bridge/obj/Bridge.fsproj.nuget.g.targets +0 -2
- package/src/Bridge/obj/Release/Fossa.Bridge.0.1.6.nuspec +0 -31
- package/src/Bridge/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +0 -3
- package/src/Bridge/obj/Release/net10.0/Bridge.AssemblyInfo.fs +0 -20
- package/src/Bridge/obj/Release/net10.0/Bridge.fsproj.FileListAbsolute.txt +0 -14
- package/src/Bridge/obj/Release/net10.0/Bridge.sourcelink.json +0 -1
- package/src/Bridge/obj/Release/net10.0/Fossa.Bridge.xml +0 -6
- package/src/Bridge/obj/Release/net10.0/ILLink.Substitutions.xml +0 -15
- package/src/Bridge/obj/project.assets.json +0 -501
- package/src/Directory.Build.props +0 -23
- package/test.ps1 +0 -11
- package/tests/Bridge.Tests/Bridge.Tests.fsproj +0 -19
- package/tests/Bridge.Tests/Main.fs +0 -7
- package/tests/Bridge.Tests/UrlHelpersTests.fs +0 -33
- package/tests/Bridge.Tests/bin/Release/net10.0/.msCoverageSourceRootsMapping_Fossa.Bridge.Tests +0 -0
- package/tests/Bridge.Tests/bin/Release/net10.0/Fossa.Bridge.Tests +0 -0
- package/tests/Bridge.Tests/bin/Release/net10.0/Fossa.Bridge.Tests.deps.json +0 -819
- package/tests/Bridge.Tests/bin/Release/net10.0/Fossa.Bridge.Tests.runtimeconfig.json +0 -14
- package/tests/Bridge.Tests/bin/Release/net10.0/Fossa.Bridge.xml +0 -6
- package/tests/Bridge.Tests/obj/Bridge.Tests.fsproj.nuget.dgspec.json +0 -712
- package/tests/Bridge.Tests/obj/Bridge.Tests.fsproj.nuget.g.props +0 -30
- package/tests/Bridge.Tests/obj/Bridge.Tests.fsproj.nuget.g.targets +0 -11
- package/tests/Bridge.Tests/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +0 -3
- package/tests/Bridge.Tests/obj/Release/net10.0/Bridge.T.A317E392.Up2Date +0 -0
- package/tests/Bridge.Tests/obj/Release/net10.0/Bridge.Tests.AssemblyInfo.fs +0 -19
- package/tests/Bridge.Tests/obj/Release/net10.0/Bridge.Tests.fsproj.FileListAbsolute.txt +0 -190
- package/tests/Bridge.Tests/obj/Release/net10.0/Bridge.Tests.sourcelink.json +0 -1
- package/tests/Bridge.Tests/obj/Release/net10.0/ILLink.Substitutions.xml +0 -15
- package/tests/Bridge.Tests/obj/Release/net10.0/apphost +0 -0
- package/tests/Bridge.Tests/obj/project.assets.json +0 -2144
- package/trigger.ps1 +0 -32
- package/tsconfig.json +0 -18
- package/version.ps1 +0 -11
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Helpers_allocateArrayFromCons = Helpers_allocateArrayFromCons;
|
|
4
|
+
function Helpers_allocateArrayFromCons(cons, len) {
|
|
5
|
+
if (cons == null) {
|
|
6
|
+
return new Array(len);
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
const cons_1 = cons;
|
|
10
|
+
if ((typeof cons_1) === "function") {
|
|
11
|
+
return new cons_1(len);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return new Array(len);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=Native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Native.js","sourceRoot":"","sources":["../../../fable_output/fable_modules/fable-library-ts.5.0.0-rc.1/Native.ts"],"names":[],"mappings":";;AAIA,sEAaC;AAbD,SAAgB,6BAA6B,CAAI,IAAS,EAAE,GAAU;IAClE,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACf,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;SACI,CAAC;QACF,MAAM,MAAM,GAAQ,IAAI,CAAC;QACzB,IAAI,CAAC,OAAO,MAAM,CAAC,KAAK,UAAU,EAAE,CAAC;YACjC,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;aACI,CAAC;YACF,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IComparable } from "./Util.ts";
|
|
2
|
+
export declare const symbol: unique symbol;
|
|
3
|
+
export interface CustomNumeric extends IComparable<Numeric> {
|
|
4
|
+
[symbol](): {
|
|
5
|
+
multiply(y: Numeric): Numeric;
|
|
6
|
+
toPrecision(sd?: number): string;
|
|
7
|
+
toExponential(dp?: number): string;
|
|
8
|
+
toFixed(dp?: number): string;
|
|
9
|
+
toHex(): string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export type Numeric = number | bigint | CustomNumeric;
|
|
13
|
+
export declare function isNumeric(x: any): any;
|
|
14
|
+
export declare function isIntegral(x: Numeric): boolean;
|
|
15
|
+
export declare function compare(x: Numeric, y: number): number;
|
|
16
|
+
export declare function multiply(x: Numeric, y: number): Numeric;
|
|
17
|
+
export declare function toFixed(x: Numeric, dp?: number): string;
|
|
18
|
+
export declare function toPrecision(x: Numeric, sd?: number): string;
|
|
19
|
+
export declare function toExponential(x: Numeric, dp?: number): string | bigint;
|
|
20
|
+
export declare function toHex(x: Numeric): string;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.symbol = void 0;
|
|
4
|
+
exports.isNumeric = isNumeric;
|
|
5
|
+
exports.isIntegral = isIntegral;
|
|
6
|
+
exports.compare = compare;
|
|
7
|
+
exports.multiply = multiply;
|
|
8
|
+
exports.toFixed = toFixed;
|
|
9
|
+
exports.toPrecision = toPrecision;
|
|
10
|
+
exports.toExponential = toExponential;
|
|
11
|
+
exports.toHex = toHex;
|
|
12
|
+
exports.symbol = Symbol("numeric");
|
|
13
|
+
function isNumeric(x) {
|
|
14
|
+
return typeof x === "number" || typeof x === "bigint" || x?.[exports.symbol];
|
|
15
|
+
}
|
|
16
|
+
function isIntegral(x) {
|
|
17
|
+
// Not perfect, because in JS we can't distinguish between 1.0 and 1
|
|
18
|
+
return typeof x === "number" && Number.isInteger(x) || typeof x === "bigint";
|
|
19
|
+
}
|
|
20
|
+
function compare(x, y) {
|
|
21
|
+
if (typeof x === "number") {
|
|
22
|
+
return x < y ? -1 : (x > y ? 1 : 0);
|
|
23
|
+
}
|
|
24
|
+
else if (typeof x === "bigint") {
|
|
25
|
+
return x < y ? -1 : (x > y ? 1 : 0);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return x.CompareTo(y);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function multiply(x, y) {
|
|
32
|
+
if (typeof x === "number") {
|
|
33
|
+
return x * y;
|
|
34
|
+
}
|
|
35
|
+
else if (typeof x === "bigint") {
|
|
36
|
+
return x * BigInt(y);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return x[exports.symbol]().multiply(y);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function toFixed(x, dp) {
|
|
43
|
+
if (typeof x === "number") {
|
|
44
|
+
return x.toFixed(dp);
|
|
45
|
+
}
|
|
46
|
+
else if (typeof x === "bigint") {
|
|
47
|
+
return x.toString();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return x[exports.symbol]().toFixed(dp);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function toPrecision(x, sd) {
|
|
54
|
+
if (typeof x === "number") {
|
|
55
|
+
return x.toPrecision(sd);
|
|
56
|
+
}
|
|
57
|
+
else if (typeof x === "bigint") {
|
|
58
|
+
return x.toString();
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return x[exports.symbol]().toPrecision(sd);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function toExponential(x, dp) {
|
|
65
|
+
if (typeof x === "number") {
|
|
66
|
+
return x.toExponential(dp);
|
|
67
|
+
}
|
|
68
|
+
else if (typeof x === "bigint") {
|
|
69
|
+
return x;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return x[exports.symbol]().toExponential(dp);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function toHex(x) {
|
|
76
|
+
if (typeof x === "number") {
|
|
77
|
+
return (Number(x) >>> 0).toString(16);
|
|
78
|
+
}
|
|
79
|
+
else if (typeof x === "bigint") {
|
|
80
|
+
// TODO: properly handle other bit sizes
|
|
81
|
+
return BigInt.asUintN(64, x).toString(16);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return x[exports.symbol]().toHex();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=Numeric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Numeric.js","sourceRoot":"","sources":["../../../fable_output/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.ts"],"names":[],"mappings":";;;AAgBA,8BAEC;AAED,gCAGC;AAED,0BAQC;AAED,4BAQC;AAED,0BAQC;AAED,kCAQC;AAED,sCAQC;AAED,sBASC;AAlFY,QAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAcxC,SAAgB,SAAS,CAAC,CAAM;IAC5B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,UAAU,CAAC,CAAU;IACjC,oEAAoE;IACpE,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC;AACjF,CAAC;AAED,SAAgB,OAAO,CAAC,CAAU,EAAE,CAAS;IACzC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CA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4
|
+
export interface IObserver<T> {
|
|
5
|
+
OnNext: (x: T) => void;
|
|
6
|
+
OnError: (e: any) => void;
|
|
7
|
+
OnCompleted: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class Observer<T> implements IObserver<T> {
|
|
10
|
+
OnNext: (x: T) => void;
|
|
11
|
+
OnError: (e: any) => void;
|
|
12
|
+
OnCompleted: () => void;
|
|
13
|
+
constructor(onNext: (x: T) => void, onError?: (e: any) => void, onCompleted?: () => void);
|
|
14
|
+
}
|
|
15
|
+
export interface IObservable<T> {
|
|
16
|
+
Subscribe: (o: IObserver<T>) => IDisposable;
|
|
17
|
+
}
|
|
18
|
+
declare class Observable<T> implements IObservable<T> {
|
|
19
|
+
Subscribe: (o: IObserver<T>) => IDisposable;
|
|
20
|
+
constructor(subscribe: (o: IObserver<T>) => IDisposable);
|
|
21
|
+
}
|
|
22
|
+
export declare function add<T>(callback: (x: T) => void, source: IObservable<T>): void;
|
|
23
|
+
export declare function choose<T, U>(chooser: (x: T) => Option<U>, source: IObservable<T>): Observable<U>;
|
|
24
|
+
export declare function filter<T>(predicate: (x: T) => boolean, source: IObservable<T>): IObservable<T>;
|
|
25
|
+
export declare function map<T, U>(mapping: (x: T) => U, source: IObservable<T>): IObservable<U>;
|
|
26
|
+
export declare function merge<T>(source1: IObservable<T>, source2: IObservable<T>): IObservable<T>;
|
|
27
|
+
export declare function pairwise<T>(source: IObservable<T>): IObservable<[T, T]>;
|
|
28
|
+
export declare function partition<T>(predicate: (x: T) => boolean, source: IObservable<T>): [Observable<T>, Observable<T>];
|
|
29
|
+
export declare function scan<U, T>(collector: (u: U, t: T) => U, state: U, source: IObservable<T>): IObservable<U>;
|
|
30
|
+
export declare function split<T, U1, U2>(splitter: (x: T) => FSharpChoice$2_$union<U1, U2>, source: IObservable<T>): [Observable<U1>, Observable<U2>];
|
|
31
|
+
export declare function subscribe<T>(callback: (x: T) => void, source: IObservable<T>): IDisposable;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Observer = void 0;
|
|
4
|
+
exports.add = add;
|
|
5
|
+
exports.choose = choose;
|
|
6
|
+
exports.filter = filter;
|
|
7
|
+
exports.map = map;
|
|
8
|
+
exports.merge = merge;
|
|
9
|
+
exports.pairwise = pairwise;
|
|
10
|
+
exports.partition = partition;
|
|
11
|
+
exports.scan = scan;
|
|
12
|
+
exports.split = split;
|
|
13
|
+
exports.subscribe = subscribe;
|
|
14
|
+
const Choice_ts_1 = require("./Choice.js");
|
|
15
|
+
const Option_ts_1 = require("./Option.js");
|
|
16
|
+
class Observer {
|
|
17
|
+
constructor(onNext, onError, onCompleted) {
|
|
18
|
+
this.OnNext = onNext;
|
|
19
|
+
this.OnError = onError || ((_e) => { return; });
|
|
20
|
+
this.OnCompleted = onCompleted || (() => { return; });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.Observer = Observer;
|
|
24
|
+
class Observable {
|
|
25
|
+
constructor(subscribe) {
|
|
26
|
+
this.Subscribe = subscribe;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function protect(f, succeed, fail) {
|
|
30
|
+
try {
|
|
31
|
+
return succeed(f());
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
fail(e);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function add(callback, source) {
|
|
38
|
+
source.Subscribe(new Observer(callback));
|
|
39
|
+
}
|
|
40
|
+
function choose(chooser, source) {
|
|
41
|
+
return new Observable((observer) => source.Subscribe(new Observer((t) => protect(() => chooser(t), (u) => { if (u != null) {
|
|
42
|
+
observer.OnNext((0, Option_ts_1.value)(u));
|
|
43
|
+
} }, observer.OnError), observer.OnError, observer.OnCompleted)));
|
|
44
|
+
}
|
|
45
|
+
function filter(predicate, source) {
|
|
46
|
+
return choose((x) => predicate(x) ? x : void 0, source);
|
|
47
|
+
}
|
|
48
|
+
function map(mapping, source) {
|
|
49
|
+
return new Observable((observer) => source.Subscribe(new Observer((t) => {
|
|
50
|
+
protect(() => mapping(t), observer.OnNext, observer.OnError);
|
|
51
|
+
}, observer.OnError, observer.OnCompleted)));
|
|
52
|
+
}
|
|
53
|
+
function merge(source1, source2) {
|
|
54
|
+
return new Observable((observer) => {
|
|
55
|
+
let stopped = false;
|
|
56
|
+
let completed1 = false;
|
|
57
|
+
let completed2 = false;
|
|
58
|
+
const h1 = source1.Subscribe(new Observer((v) => { if (!stopped) {
|
|
59
|
+
observer.OnNext(v);
|
|
60
|
+
} }, (e) => {
|
|
61
|
+
if (!stopped) {
|
|
62
|
+
stopped = true;
|
|
63
|
+
observer.OnError(e);
|
|
64
|
+
}
|
|
65
|
+
}, () => {
|
|
66
|
+
if (!stopped) {
|
|
67
|
+
completed1 = true;
|
|
68
|
+
if (completed2) {
|
|
69
|
+
stopped = true;
|
|
70
|
+
observer.OnCompleted();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
const h2 = source2.Subscribe(new Observer((v) => { if (!stopped) {
|
|
75
|
+
observer.OnNext(v);
|
|
76
|
+
} }, (e) => {
|
|
77
|
+
if (!stopped) {
|
|
78
|
+
stopped = true;
|
|
79
|
+
observer.OnError(e);
|
|
80
|
+
}
|
|
81
|
+
}, () => {
|
|
82
|
+
if (!stopped) {
|
|
83
|
+
completed2 = true;
|
|
84
|
+
if (completed1) {
|
|
85
|
+
stopped = true;
|
|
86
|
+
observer.OnCompleted();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
return {
|
|
91
|
+
Dispose() {
|
|
92
|
+
h1.Dispose();
|
|
93
|
+
h2.Dispose();
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function pairwise(source) {
|
|
99
|
+
return new Observable((observer) => {
|
|
100
|
+
let last;
|
|
101
|
+
return source.Subscribe(new Observer((next) => {
|
|
102
|
+
if (last != null) {
|
|
103
|
+
observer.OnNext([last, next]);
|
|
104
|
+
}
|
|
105
|
+
last = next;
|
|
106
|
+
}, observer.OnError, observer.OnCompleted));
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function partition(predicate, source) {
|
|
110
|
+
return [filter(predicate, source), filter((x) => !predicate(x), source)];
|
|
111
|
+
}
|
|
112
|
+
function scan(collector, state, source) {
|
|
113
|
+
return new Observable((observer) => {
|
|
114
|
+
return source.Subscribe(new Observer((t) => {
|
|
115
|
+
protect(() => collector(state, t), (u) => { state = u; observer.OnNext(u); }, observer.OnError);
|
|
116
|
+
}, observer.OnError, observer.OnCompleted));
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function split(splitter, source) {
|
|
120
|
+
return [
|
|
121
|
+
choose((v) => (0, Choice_ts_1.Choice_tryValueIfChoice1Of2)(splitter(v)), source),
|
|
122
|
+
choose((v) => (0, Choice_ts_1.Choice_tryValueIfChoice2Of2)(splitter(v)), source)
|
|
123
|
+
];
|
|
124
|
+
}
|
|
125
|
+
function subscribe(callback, source) {
|
|
126
|
+
return source.Subscribe(new Observer(callback));
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=Observable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Observable.js","sourceRoot":"","sources":["../../../fable_output/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.ts"],"names":[],"mappings":";;;AA2CA,kBAEC;AAED,wBAQC;AAED,wBAEC;AAED,kBAQC;AAED,sBA8CC;AAED,4BAUC;AAED,8BAEC;AAED,oBASC;AAED,sBAKC;AAED,8BAEC;AA1JD,2CAA8G;AAC9G,2CAA4C;AAS5C,MAAa,QAAQ;IAKnB,YAAY,MAAsB,EAAE,OAA0B,EAAE,WAAwB;QACtF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,CAAC,CAAC,E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,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Nullable } from "./Util.ts";
|
|
2
|
+
export type Option<T> = T | Some<T> | undefined;
|
|
3
|
+
export declare class Some<T> {
|
|
4
|
+
value: T;
|
|
5
|
+
constructor(value: T);
|
|
6
|
+
toJSON(): T;
|
|
7
|
+
toString(): string;
|
|
8
|
+
GetHashCode(): number;
|
|
9
|
+
Equals(other: Option<T>): boolean;
|
|
10
|
+
CompareTo(other: Option<T>): number;
|
|
11
|
+
}
|
|
12
|
+
export declare function nonNullValue<T>(x: Nullable<T>): T;
|
|
13
|
+
export declare function value<T>(x: Option<T>): T;
|
|
14
|
+
export declare function unwrap<T>(opt: Option<T>): T | undefined;
|
|
15
|
+
export declare function some<T>(x: T): Option<T>;
|
|
16
|
+
export declare function ofNullable<T>(x: Nullable<T>): Option<T>;
|
|
17
|
+
export declare function toNullable<T>(x: Option<T>): Nullable<T>;
|
|
18
|
+
export declare function flatten<T>(x: Option<Option<T>>): T | Some<T> | undefined;
|
|
19
|
+
export declare function toArray<T>(opt: Option<T>): T[];
|
|
20
|
+
export declare function defaultArg<T>(opt: Option<T>, defaultValue: T): T;
|
|
21
|
+
export declare function defaultArgWith<T>(opt: Option<T>, defThunk: () => T): T;
|
|
22
|
+
export declare function orElse<T>(opt: Option<T>, ifNone: Option<T>): Option<T>;
|
|
23
|
+
export declare function orElseWith<T>(opt: Option<T>, ifNoneThunk: () => Option<T>): Option<T>;
|
|
24
|
+
export declare function filter<T>(predicate: (arg: T) => boolean, opt: Option<T>): Option<T>;
|
|
25
|
+
export declare function map<T, U>(mapping: (arg: T) => U, opt: Option<T>): Option<U>;
|
|
26
|
+
export declare function map2<T1, T2, U>(mapping: (arg1: T1, arg2: T2) => Option<U>, opt1: Option<T1>, opt2: Option<T2>): Option<U>;
|
|
27
|
+
export declare function map3<T1, T2, T3, U>(mapping: (arg1: T1, arg2: T2, arg3: T3) => Option<U>, opt1: Option<T1>, opt2: Option<T2>, opt3: Option<T3>): Option<U>;
|
|
28
|
+
export declare function bind<T, U>(binder: (arg: T) => Option<U>, opt: Option<T>): Option<U>;
|
|
29
|
+
export declare function tryOp<T, U>(op: (x: T) => U, arg: T): Option<U>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Some = void 0;
|
|
4
|
+
exports.nonNullValue = nonNullValue;
|
|
5
|
+
exports.value = value;
|
|
6
|
+
exports.unwrap = unwrap;
|
|
7
|
+
exports.some = some;
|
|
8
|
+
exports.ofNullable = ofNullable;
|
|
9
|
+
exports.toNullable = toNullable;
|
|
10
|
+
exports.flatten = flatten;
|
|
11
|
+
exports.toArray = toArray;
|
|
12
|
+
exports.defaultArg = defaultArg;
|
|
13
|
+
exports.defaultArgWith = defaultArgWith;
|
|
14
|
+
exports.orElse = orElse;
|
|
15
|
+
exports.orElseWith = orElseWith;
|
|
16
|
+
exports.filter = filter;
|
|
17
|
+
exports.map = map;
|
|
18
|
+
exports.map2 = map2;
|
|
19
|
+
exports.map3 = map3;
|
|
20
|
+
exports.bind = bind;
|
|
21
|
+
exports.tryOp = tryOp;
|
|
22
|
+
const Util_ts_1 = require("./Util.js");
|
|
23
|
+
// Using a class here for better compatibility with TS files importing Some
|
|
24
|
+
class Some {
|
|
25
|
+
constructor(value) {
|
|
26
|
+
this.value = value;
|
|
27
|
+
}
|
|
28
|
+
toJSON() {
|
|
29
|
+
return this.value;
|
|
30
|
+
}
|
|
31
|
+
// Don't add "Some" for consistency with erased options
|
|
32
|
+
toString() {
|
|
33
|
+
return String(this.value);
|
|
34
|
+
}
|
|
35
|
+
GetHashCode() {
|
|
36
|
+
return (0, Util_ts_1.structuralHash)(this.value);
|
|
37
|
+
}
|
|
38
|
+
Equals(other) {
|
|
39
|
+
if (other == null) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return (0, Util_ts_1.equals)(this.value, other instanceof Some ? other.value : other);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
CompareTo(other) {
|
|
47
|
+
if (other == null) {
|
|
48
|
+
return 1;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return (0, Util_ts_1.compare)(this.value, other instanceof Some ? other.value : other);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Some = Some;
|
|
56
|
+
function nonNullValue(x) {
|
|
57
|
+
if (x == null) {
|
|
58
|
+
throw new Util_ts_1.Exception("Nullable has no value");
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return x;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function value(x) {
|
|
65
|
+
if (x == null) {
|
|
66
|
+
throw new Util_ts_1.Exception("Option has no value");
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
return x instanceof Some ? x.value : x;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function unwrap(opt) {
|
|
73
|
+
return opt instanceof Some ? opt.value : opt;
|
|
74
|
+
}
|
|
75
|
+
function some(x) {
|
|
76
|
+
return x == null || x instanceof Some ? new Some(x) : x;
|
|
77
|
+
}
|
|
78
|
+
function ofNullable(x) {
|
|
79
|
+
// This will fail with unit probably, an alternative would be:
|
|
80
|
+
// return x === null ? undefined : (x === undefined ? new Some(x) : x);
|
|
81
|
+
return x == null ? undefined : x;
|
|
82
|
+
}
|
|
83
|
+
function toNullable(x) {
|
|
84
|
+
return x == null ? null : value(x);
|
|
85
|
+
}
|
|
86
|
+
function flatten(x) {
|
|
87
|
+
return x == null ? undefined : value(x);
|
|
88
|
+
}
|
|
89
|
+
function toArray(opt) {
|
|
90
|
+
return (opt == null) ? [] : [value(opt)];
|
|
91
|
+
}
|
|
92
|
+
function defaultArg(opt, defaultValue) {
|
|
93
|
+
return (opt != null) ? value(opt) : defaultValue;
|
|
94
|
+
}
|
|
95
|
+
function defaultArgWith(opt, defThunk) {
|
|
96
|
+
return (opt != null) ? value(opt) : defThunk();
|
|
97
|
+
}
|
|
98
|
+
function orElse(opt, ifNone) {
|
|
99
|
+
return opt == null ? ifNone : opt;
|
|
100
|
+
}
|
|
101
|
+
function orElseWith(opt, ifNoneThunk) {
|
|
102
|
+
return opt == null ? ifNoneThunk() : opt;
|
|
103
|
+
}
|
|
104
|
+
function filter(predicate, opt) {
|
|
105
|
+
return (opt != null) ? (predicate(value(opt)) ? opt : undefined) : opt;
|
|
106
|
+
}
|
|
107
|
+
function map(mapping, opt) {
|
|
108
|
+
return (opt != null) ? some(mapping(value(opt))) : undefined;
|
|
109
|
+
}
|
|
110
|
+
function map2(mapping, opt1, opt2) {
|
|
111
|
+
return (opt1 != null && opt2 != null) ? mapping(value(opt1), value(opt2)) : undefined;
|
|
112
|
+
}
|
|
113
|
+
function map3(mapping, opt1, opt2, opt3) {
|
|
114
|
+
return (opt1 != null && opt2 != null && opt3 != null) ? mapping(value(opt1), value(opt2), value(opt3)) : undefined;
|
|
115
|
+
}
|
|
116
|
+
function bind(binder, opt) {
|
|
117
|
+
return opt != null ? binder(value(opt)) : undefined;
|
|
118
|
+
}
|
|
119
|
+
function tryOp(op, arg) {
|
|
120
|
+
try {
|
|
121
|
+
return some(op(arg));
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=Option.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../fable_output/fable_modules/fable-library-ts.5.0.0-rc.1/Option.ts"],"names":[],"mappings":";;;AAsDA,oCAMC;AAED,sBAMC;AAED,wBAEC;AAED,oBAEC;AAED,gCAIC;AAED,gCAEC;AAED,0BAEC;AAED,0BAEC;AAED,gCAEC;AAED,wCAEC;AAED,wBAE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AC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxF,CAAC;AAED,SAAgB,IAAI,CAClB,OAAoD,EACpD,IAAgB,EAAE,IAAgB,EAAE,IAAgB;IACpD,OAAO,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACrH,CAAC;AAED,SAAgB,IAAI,CAAO,MAA6B,EAAE,GAAc;IACtE,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAED,SAAgB,KAAK,CAAO,EAAe,EAAE,GAAM;IACjD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { uint8, int32, float64 } from "./Int32.ts";
|
|
2
|
+
import { MutableArray } from "./Util.ts";
|
|
3
|
+
import { TypeInfo } from "./Reflection.ts";
|
|
4
|
+
export interface IRandom {
|
|
5
|
+
Next0(): int32;
|
|
6
|
+
Next1(maxValue: int32): int32;
|
|
7
|
+
Next2(minValue: int32, maxValue: int32): int32;
|
|
8
|
+
NextBytes(buffer: MutableArray<uint8>): void;
|
|
9
|
+
NextDouble(): float64;
|
|
10
|
+
}
|
|
11
|
+
export declare class NonSeeded implements IRandom {
|
|
12
|
+
constructor();
|
|
13
|
+
Next0(): int32;
|
|
14
|
+
Next1(maxValue: int32): int32;
|
|
15
|
+
Next2(minValue: int32, maxValue: int32): int32;
|
|
16
|
+
NextDouble(): float64;
|
|
17
|
+
NextBytes(buffer: MutableArray<uint8>): void;
|
|
18
|
+
}
|
|
19
|
+
export declare function NonSeeded_$reflection(): TypeInfo;
|
|
20
|
+
export declare function NonSeeded_$ctor(): NonSeeded;
|
|
21
|
+
export declare class Seeded implements IRandom {
|
|
22
|
+
readonly MBIG: int32;
|
|
23
|
+
inext: int32;
|
|
24
|
+
inextp: int32;
|
|
25
|
+
seedArray: MutableArray<int32>;
|
|
26
|
+
constructor(seed: int32);
|
|
27
|
+
Next0(): int32;
|
|
28
|
+
Next1(maxValue: int32): int32;
|
|
29
|
+
Next2(minValue: int32, maxValue: int32): int32;
|
|
30
|
+
NextDouble(): float64;
|
|
31
|
+
NextBytes(buffer: MutableArray<uint8>): void;
|
|
32
|
+
}
|
|
33
|
+
export declare function Seeded_$reflection(): TypeInfo;
|
|
34
|
+
export declare function Seeded_$ctor_Z524259A4(seed: int32): Seeded;
|
|
35
|
+
export declare function Seeded__Sample(this$: Seeded): float64;
|
|
36
|
+
export declare function Seeded__GetSampleForLargeRange(this$: Seeded): float64;
|
|
37
|
+
export declare function nonSeeded(): NonSeeded;
|
|
38
|
+
export declare function seeded(seed: int32): Seeded;
|