SP-152 fix F# type definition
This commit is contained in:
1 parent
1f0371e870
commit
6b81dcef7d
4 files changed
+17
-2
No files matched your search
@@ -69,7 +69,7 @@ type I{{name}} =
|
||||
{{#each method}}
|
||||
{{#if server_streaming}}
|
||||
// {{comment}}
|
||||
abstract member subscribe_{{name}} : qualifier:string -> callback:(DynamicService.Update<{{output_type_full}}>->unit) -> unit
|
||||
abstract member subscribe_{{name}} : qualifier:string -> callback:(StreamUtils.IUpdate<{{output_type_full}}>->unit) -> unit
|
||||
{{else}}
|
||||
// {{comment}}
|
||||
abstract member {{name}}: {{input_type_full}} -> Fable.Import.JS.Promise<{{output_type_full}}>
|
||||
|
||||
@@ -107,7 +107,7 @@ class PrivateContext {
|
||||
onmessage(e){
|
||||
const raw_buffer = new Uint8Array(e.data)
|
||||
const response = GatewayResponse.decode(raw_buffer)
|
||||
if (response && response.callResult && response.callresults.length > 0) {
|
||||
if (response && response.callResult && response.callResult.length > 0) {
|
||||
const call_buffer = response.callResult
|
||||
const header_size = call_buffer[0]
|
||||
const sub = call_buffer.subarray(1, header_size)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
module StreamUtils
|
||||
open JSMap
|
||||
|
||||
type Change<'a> = {
|
||||
newItem : 'a
|
||||
oldItem : 'a
|
||||
}
|
||||
|
||||
type IUpdate<'a> =
|
||||
abstract member all : JSMap<'a> with get
|
||||
abstract member added : JSMap<'a> with get
|
||||
abstract member removed : JSMap<'a> with get
|
||||
abstract member changed : JSMap<Change<'a>> with get
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<Compile Include="$(API)/DynamicService.fs" />
|
||||
<Compile Include="Imports.fs" />
|
||||
<Compile Include="Util/JSMap.fs" />
|
||||
<Compile Include="Util/StreamUtils.fs" />
|
||||
<Compile Include="Util/EnumUtils.fs" />
|
||||
<Compile Include="$(API)/fable/timestamp.fable.fs" />
|
||||
<Compile Include="$(API)/fable/apicore.fable.fs" />
|
||||
|
||||
Reference in new issue
Block a user