Comments (7)
If methods could return async-iterators this would allow for things like live updated news or messaging feeds. Ideally, it would support both iterators of json-objects as well as iterators of Uint8Array
s for efficient binary applications.
from gentle_rpc.
It works using the file from client/dist/remote.js
.
from gentle_rpc.
Thanks for reporting @retog . I will add a more browser compatible bundle in the next release. I will also minify it.
from gentle_rpc.
Just for the record, I run the deno bundle
command with this tsconfig.json
file:
{
"compilerOptions": {
"removeComments": true,
"lib": ["esnext", "dom", "dom.iterable", "dom.asynciterable", "deno.ns"],
"experimentalDecorators": true,
"importsNotUsedAsValues": "preserve",
"strict": true,
"noFallthroughCasesInSwitch": false
}
}
To make it compatible with older Safari versions I will run babel
with the following babel.config.json
. It transpiles classes and es-modules to compatible JavaScript.
{
"presets": [
[
"@babel/env",
{
"modules": false
}
]
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
Then I will use terser
to minify it.
The emitted JavaScript code will work in browsers going far back but I would welcome additional recommendations.
from gentle_rpc.
Thanks, @timonson!
I'm totally new to deno and haven't found out how client/dist/remote.js
is generated. Using the pre-generated file the example seems to work.
Unrelated to this issue: do you plan on adding support for more type? Will a method like '() => { [Symbol.asyncIterator](): AsyncGenerator<{ hostname: string; addresses: string[]; }, void, unknown>; }'
be supported?
from gentle_rpc.
Hi, I am definitely open to add abstractions. Unfortunately I am not sure if I understand your example/method correctly. Would you mind adding a little bit more context (what is the goal?) or an example to it? Thanks a lot!
from gentle_rpc.
In this folder are the compiled files. Only the http.js
file supports legacy browsers. https://github.com/timonson/gentle_rpc/tree/master/client/dist
from gentle_rpc.
Related Issues (8)
- websocket support HOT 2
- Implement validation/schema
- generateId() should not rely on window to get crypto object because there is no window in worker HOT 2
- Error: The received data is no valid JSON-RPC 2.0 Response object. HOT 2
- Feature request HOT 9
- Function call never yields result HOT 2
- new std/[email protected] API support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gentle_rpc.