ikatyang / dts-element-fp Goto Github PK
View Code? Open in Web Editor NEWtypescript definition generator for functional programming
Home Page: https://ikatyang.github.io/dts-element-fp/
License: MIT License
typescript definition generator for functional programming
Home Page: https://ikatyang.github.io/dts-element-fp/
License: MIT License
On registry https://registry.npmjs.org/
, the "latest" version (v1.5.0) of dependency tslint-config-prettier-ext
has the following deprecation notice:
[DEPRECATED] This project has been merged into tslint-config-prettier
Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.
Affected package file(s): package.json
If you don't care about this, you can close this issue and not be warned about tslint-config-prettier-ext
's deprecation again. If you would like to completely disable all future deprecation warnings then add the following to your config:
"suppressNotifications": ["deprecationWarningIssues"]
declare const append: append_00;
type append_00 = {
<T>(value: T): append_10<T>;
- <T, U>(value: T, list: List<U>): append_11<T, U>;
+ <T, U>(value: T, list: List<U>): (T | U)[];
};
type append_10<T> = {
- <U>(list: List<U>): append_11<T, U>;
+ <U>(list: List<U>): (T | U)[];
};
-type append_11<T, U> = (T | U)[];
See typed-typings/npm-ramda#191 (comment) for the reason.
dts.emit(curried_declarations_various); /*=>
declare const map: map_00;
type map_00 = {
<T, U>(fn: (x: T) => U): map_10<T, U>;
<T, U>(fn: (x: T) => U, list: List<T>): map_list_11<U>;
<T, U>(fn: (x: T) => U, functor: Functor<T>): map_functor_11<U>;
};
type map_10<T, U> = {
(list: List<T>): map_list_11<U>;
(functor: Functor<T>): map_functor_11<U>;
};
// ====== unnecessary ======
type map_list_01<T> = {
<U>(fn: (x: T) => U): map_list_11<U>;
};
type map_functor_01<T> = {
<U>(fn: (x: T) => U): map_functor_11<U>;
};
// ====== unnecessary ======
type map_list_11<U> = U[];
type map_functor_11<U> = Functor<U>;
*/
function a(x: number, y: boolean): any;
function b(x: number, y: string): any;
function c(x: object, y: string): any;
Current
type a = {
(x: number): (y: boolean) => any;
};
type b = {
(x: number): (y: string) => any;
};
type c = {
(x: object): (y: string) => any;
};
Proposed
type a_b = {
(x: number): {
(y: boolean): any;
(y: string): any;
};
};
type c = {
(x: object): (y: string) => any;
};
Context: typed-typings/npm-ramda#311 (comment)
before
generated_types_with_selectable_overloads() //=> match the first overload in the source
after
generated_types_with_selectable_overloads() //=> match the last overload in the source
NOTE: the last overload in the source is considered the most general case.
declare const type: type_null_0;
// should merge all mergeable types
type type_null_0 = {
(value: null): "Null";
};
type type_undefined_0 = {
(value: undefined): "Undefined";
};
type type_boolean_0 = {
(value: boolean): "Boolean";
};
type type_number_0 = {
(value: number): "Number";
};
type type_string_0 = {
(value: string): "String";
};
type type_symbol_0 = {
(value: symbol): "Symbol";
};
type type_general_0 = {
(value: any): string;
};
export = type;
declare const is: is_00;
type is_00 = {
<T>(constructor: Constructor<T>): is_10<T>;
(_constructor: PH, value: any): is_01;
<$SEL extends "1">(): <T>(constructor: Constructor<T>) => is_10<T>;
<$SEL extends "01">(): (_constructor: PH, value: any) => is_01;
<$SEL extends "11">(): <T>(constructor: Constructor<T>, value: any) => value is T;
<T>(constructor: Constructor<T>, value: any): value is T;
};
type is_10<T> = {
(value: any): value is T;
};
type is_01 = {
<T>(constructor: Constructor<T>): value is T;
// ^^^^^ [ts] Cannot find parameter 'value'.
};
export = is;
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.