typelevel / catapult Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://typelevel.org/catapult/
License: Apache License 2.0
Home Page: https://typelevel.org/catapult/
License: Apache License 2.0
e.g. basic usage examples
Pull request open: typelevel/steward#29
This needs some brainstorming on what the API should look like and how to balance ergonomics with type safety.
TODO: add some strawman ideas
Ideas from TL submission:
When using the default configuration it should be possible to create the client by calling LaunchDarklyClient.resource(sdkKey)
, similar to how there is a one-argument constructor on the underlying LDClient
.
This is largely a quality-of-life suggestion to make encoder definitions less painful, especially when they have only one or two fields.
Add a def simple()
method on the ContextEncoder
companion object, such as:
def simple[Ctx](_kind: String)(_key: Ctx => String): ContextEncoder[Ctx] = new ContextEncoder[Ctx] {
...
}
Alongside this define methods to allow additional attributes, e.g.
def withStringAttribute(attributeName: String)(f: Ctx => String): ContextEncoder[Ctx] = ...
def withBooleanAttribute(attributeName: String)(f: Ctx => Boolean): ContextEncoder[Ctx] = ...
These can then be used together, for example:
implicit val anEncoder: ContextEncoder[Type] =
ContextEncoder
.simple[Type]("kind")(key = type.someField)
.withStringAttribute("otherKind")(_.someOtherField)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.