New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

option-t

Package Overview
Dependencies
Maintainers
1
Versions
333
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

option-t - npm Package Compare versions

Comparing version 0.12.3 to 0.13.0

19

CHANGELOG.md

@@ -6,2 +6,21 @@ # Changelog

## 0.13.0
### New Feature
* Expose `OptionBase` to TypeScript's type definition.
* __NOTICE__:
* In general purpose, __you must not use this object__.
* You can only this object if you need to cooperate with some libralies
like `React.PropTypes` which are use `instanceof` checking to work together with
others in the pure JavaScript world.
The typical case is [TSX (TypeScript JSX) syntax](https://github.com/Microsoft/TypeScript/wiki/JSX).
* Our basic stance is that _you don't use this and need not it in almost case_.
* See also [#77](https://github.com/saneyuki/option-t.js/pull/77)
### Internal
* Support Node.js v4. [#79](https://github.com/saneyuki/option-t.js/pull/79)
## 0.12.3

@@ -8,0 +27,0 @@

25

option-t.d.ts

@@ -168,3 +168,24 @@ /**

class Some<T> implements Option<T> {
/**
* The base object of `Some<T>` and `None<T>`.
*
* XXX:
* In general case, __we must not use this base object__.
* __Use `Option<T>` interface strongly__.
*
* You can only this object if you need to cooperate with some libralies
* like `React.PropTypes` which are use `instanceof` checking to work together with
* others in the pure JavaScript world.
*
* The typical case is TSX (TypeScript JSX) syntax.
* https://github.com/Microsoft/TypeScript/wiki/JSX
*
* Our basic stance is that _you don't use this and need not it in almost case_.
*
* See also:
* https://github.com/saneyuki/option-t.js/pull/77
*/
class OptionBase {}
class Some<T> extends OptionBase implements Option<T> {
constructor(val: T);

@@ -189,3 +210,3 @@ isSome: boolean;

class None<T> implements Option<T> {
class None<T> extends OptionBase implements Option<T> {
constructor();

@@ -192,0 +213,0 @@ isSome: boolean;

{
"name": "option-t",
"version": "0.12.3",
"version": "0.13.0",
"description": "Option type implementation whose APIs are inspired by Rust's `Option<T>`.",

@@ -14,2 +14,6 @@ "main": "src/index.js",

],
"engines": {
"node": ">=0.10",
"iojs": ">=1.0 <4.0"
},
"scripts": {

@@ -16,0 +20,0 @@ "lint": "eslint ./src/",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc