Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
fix(curried-interfaces): support multi-version building
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatyang committed Jun 27, 2017
1 parent 7d987d2 commit f846073
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 9 deletions.
18 changes: 13 additions & 5 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ function get_top_level_members(filename: string, selectable?: boolean, placehold
const members: dts.ITopLevelMember[] = [];
const basename = path.basename(filename);

if (basename.endsWith('.d.ts')) {
if (basename === '$curried-functions.ts') {
push_curried_functions_members();
} else if (basename.endsWith('.d.ts')) {
if (basename.startsWith('$')) {
push_r_ts_members();
} else {
Expand Down Expand Up @@ -154,15 +156,21 @@ function get_top_level_members(filename: string, selectable?: boolean, placehold
}

function push_ts_members() {
const declarations = get_ts_members();
const declarations = get_ts_default();
members.push(...declarations);
}

function push_c_ts_members() {
const declarations = get_ts_members();
const declarations = get_ts_default();
push_curry_members(declarations);
}

function push_curried_functions_members() {
const curried_functions_generator = get_ts_default(true);
const declarations = curried_functions_generator(selectable, placeholder);
members.push(...declarations);
}

function push_curry_members(the_members: dts.ITopLevelMember[]) {
const imports = the_members.filter(
(member): member is dts.IImportNamed => (member.kind === dts.ElementKind.ImportNamed),
Expand Down Expand Up @@ -212,13 +220,13 @@ function get_top_level_members(filename: string, selectable?: boolean, placehold
);
}

function get_ts_members() {
function get_ts_default(special_case = false) {
// tslint:disable-next-line:no-require-imports
const required: any = require(filename);
delete require.cache[require.resolve(filename)];
const declarations = required.default;

if (!is_valid_export_default(declarations)) {
if (!special_case && !is_valid_export_default(declarations)) {
throw new Error(`Template.ts should default-export an array of declarations: ${filename}`);
}

Expand Down
119 changes: 119 additions & 0 deletions src/$curried-functions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export interface CurriedFunction1<T1, R> {
export interface CurriedFunction2<T1, T2, R> {
(_1: PH, v2: T2): CurriedFunction1<T1, R>;
(v1: T1, v2: T2): R;
<$SEL extends "01">(): (_1: PH, v2: T2) => CurriedFunction1<T1, R>;
<$SEL extends "11">(): (v1: T1, v2: T2) => R;
<$SEL extends "1">(): (v1: T1) => CurriedFunction1<T2, R>;
(v1: T1): CurriedFunction1<T2, R>;
}
export interface CurriedFunction3<T1, T2, T3, R> {
Expand All @@ -15,6 +18,13 @@ export interface CurriedFunction3<T1, T2, T3, R> {
(v1: T1, v2: T2, v3: T3): R;
(_1: PH, v2: T2): CurriedFunction2<T1, T3, R>;
(v1: T1, v2: T2): CurriedFunction1<T3, R>;
<$SEL extends "101">(): (v1: T1, _2: PH, v3: T3) => CurriedFunction1<T2, R>;
<$SEL extends "011">(): (_1: PH, v2: T2, v3: T3) => CurriedFunction1<T1, R>;
<$SEL extends "001">(): (_1: PH, _2: PH, v3: T3) => CurriedFunction2<T1, T2, R>;
<$SEL extends "111">(): (v1: T1, v2: T2, v3: T3) => R;
<$SEL extends "01">(): (_1: PH, v2: T2) => CurriedFunction2<T1, T3, R>;
<$SEL extends "11">(): (v1: T1, v2: T2) => CurriedFunction1<T3, R>;
<$SEL extends "1">(): (v1: T1) => CurriedFunction2<T2, T3, R>;
(v1: T1): CurriedFunction2<T2, T3, R>;
}
export interface CurriedFunction4<T1, T2, T3, T4, R> {
Expand All @@ -32,6 +42,21 @@ export interface CurriedFunction4<T1, T2, T3, T4, R> {
(v1: T1, v2: T2, v3: T3): CurriedFunction1<T4, R>;
(_1: PH, v2: T2): CurriedFunction3<T1, T3, T4, R>;
(v1: T1, v2: T2): CurriedFunction2<T3, T4, R>;
<$SEL extends "1101">(): (v1: T1, v2: T2, _3: PH, v4: T4) => CurriedFunction1<T3, R>;
<$SEL extends "1011">(): (v1: T1, _2: PH, v3: T3, v4: T4) => CurriedFunction1<T2, R>;
<$SEL extends "1001">(): (v1: T1, _2: PH, _3: PH, v4: T4) => CurriedFunction2<T2, T3, R>;
<$SEL extends "0111">(): (_1: PH, v2: T2, v3: T3, v4: T4) => CurriedFunction1<T1, R>;
<$SEL extends "0101">(): (_1: PH, v2: T2, _3: PH, v4: T4) => CurriedFunction2<T1, T3, R>;
<$SEL extends "0011">(): (_1: PH, _2: PH, v3: T3, v4: T4) => CurriedFunction2<T1, T2, R>;
<$SEL extends "0001">(): (_1: PH, _2: PH, _3: PH, v4: T4) => CurriedFunction3<T1, T2, T3, R>;
<$SEL extends "1111">(): (v1: T1, v2: T2, v3: T3, v4: T4) => R;
<$SEL extends "101">(): (v1: T1, _2: PH, v3: T3) => CurriedFunction2<T2, T4, R>;
<$SEL extends "011">(): (_1: PH, v2: T2, v3: T3) => CurriedFunction2<T1, T4, R>;
<$SEL extends "001">(): (_1: PH, _2: PH, v3: T3) => CurriedFunction3<T1, T2, T4, R>;
<$SEL extends "111">(): (v1: T1, v2: T2, v3: T3) => CurriedFunction1<T4, R>;
<$SEL extends "01">(): (_1: PH, v2: T2) => CurriedFunction3<T1, T3, T4, R>;
<$SEL extends "11">(): (v1: T1, v2: T2) => CurriedFunction2<T3, T4, R>;
<$SEL extends "1">(): (v1: T1) => CurriedFunction3<T2, T3, T4, R>;
(v1: T1): CurriedFunction3<T2, T3, T4, R>;
}
export interface CurriedFunction5<T1, T2, T3, T4, T5, R> {
Expand Down Expand Up @@ -65,6 +90,37 @@ export interface CurriedFunction5<T1, T2, T3, T4, T5, R> {
(v1: T1, v2: T2, v3: T3): CurriedFunction2<T4, T5, R>;
(_1: PH, v2: T2): CurriedFunction4<T1, T3, T4, T5, R>;
(v1: T1, v2: T2): CurriedFunction3<T3, T4, T5, R>;
<$SEL extends "11101">(): (v1: T1, v2: T2, v3: T3, _4: PH, v5: T5) => CurriedFunction1<T4, R>;
<$SEL extends "11011">(): (v1: T1, v2: T2, _3: PH, v4: T4, v5: T5) => CurriedFunction1<T3, R>;
<$SEL extends "11001">(): (v1: T1, v2: T2, _3: PH, _4: PH, v5: T5) => CurriedFunction2<T3, T4, R>;
<$SEL extends "10111">(): (v1: T1, _2: PH, v3: T3, v4: T4, v5: T5) => CurriedFunction1<T2, R>;
<$SEL extends "10101">(): (v1: T1, _2: PH, v3: T3, _4: PH, v5: T5) => CurriedFunction2<T2, T4, R>;
<$SEL extends "10011">(): (v1: T1, _2: PH, _3: PH, v4: T4, v5: T5) => CurriedFunction2<T2, T3, R>;
<$SEL extends "10001">(): (v1: T1, _2: PH, _3: PH, _4: PH, v5: T5) => CurriedFunction3<T2, T3, T4, R>;
<$SEL extends "01111">(): (_1: PH, v2: T2, v3: T3, v4: T4, v5: T5) => CurriedFunction1<T1, R>;
<$SEL extends "01101">(): (_1: PH, v2: T2, v3: T3, _4: PH, v5: T5) => CurriedFunction2<T1, T4, R>;
<$SEL extends "01011">(): (_1: PH, v2: T2, _3: PH, v4: T4, v5: T5) => CurriedFunction2<T1, T3, R>;
<$SEL extends "01001">(): (_1: PH, v2: T2, _3: PH, _4: PH, v5: T5) => CurriedFunction3<T1, T3, T4, R>;
<$SEL extends "00111">(): (_1: PH, _2: PH, v3: T3, v4: T4, v5: T5) => CurriedFunction2<T1, T2, R>;
<$SEL extends "00101">(): (_1: PH, _2: PH, v3: T3, _4: PH, v5: T5) => CurriedFunction3<T1, T2, T4, R>;
<$SEL extends "00011">(): (_1: PH, _2: PH, _3: PH, v4: T4, v5: T5) => CurriedFunction3<T1, T2, T3, R>;
<$SEL extends "00001">(): (_1: PH, _2: PH, _3: PH, _4: PH, v5: T5) => CurriedFunction4<T1, T2, T3, T4, R>;
<$SEL extends "11111">(): (v1: T1, v2: T2, v3: T3, v4: T4, v5: T5) => R;
<$SEL extends "1101">(): (v1: T1, v2: T2, _3: PH, v4: T4) => CurriedFunction2<T3, T5, R>;
<$SEL extends "1011">(): (v1: T1, _2: PH, v3: T3, v4: T4) => CurriedFunction2<T2, T5, R>;
<$SEL extends "1001">(): (v1: T1, _2: PH, _3: PH, v4: T4) => CurriedFunction3<T2, T3, T5, R>;
<$SEL extends "0111">(): (_1: PH, v2: T2, v3: T3, v4: T4) => CurriedFunction2<T1, T5, R>;
<$SEL extends "0101">(): (_1: PH, v2: T2, _3: PH, v4: T4) => CurriedFunction3<T1, T3, T5, R>;
<$SEL extends "0011">(): (_1: PH, _2: PH, v3: T3, v4: T4) => CurriedFunction3<T1, T2, T5, R>;
<$SEL extends "0001">(): (_1: PH, _2: PH, _3: PH, v4: T4) => CurriedFunction4<T1, T2, T3, T5, R>;
<$SEL extends "1111">(): (v1: T1, v2: T2, v3: T3, v4: T4) => CurriedFunction1<T5, R>;
<$SEL extends "101">(): (v1: T1, _2: PH, v3: T3) => CurriedFunction3<T2, T4, T5, R>;
<$SEL extends "011">(): (_1: PH, v2: T2, v3: T3) => CurriedFunction3<T1, T4, T5, R>;
<$SEL extends "001">(): (_1: PH, _2: PH, v3: T3) => CurriedFunction4<T1, T2, T4, T5, R>;
<$SEL extends "111">(): (v1: T1, v2: T2, v3: T3) => CurriedFunction2<T4, T5, R>;
<$SEL extends "01">(): (_1: PH, v2: T2) => CurriedFunction4<T1, T3, T4, T5, R>;
<$SEL extends "11">(): (v1: T1, v2: T2) => CurriedFunction3<T3, T4, T5, R>;
<$SEL extends "1">(): (v1: T1) => CurriedFunction4<T2, T3, T4, T5, R>;
(v1: T1): CurriedFunction4<T2, T3, T4, T5, R>;
}
export interface CurriedFunction6<T1, T2, T3, T4, T5, T6, R> {
Expand Down Expand Up @@ -130,5 +186,68 @@ export interface CurriedFunction6<T1, T2, T3, T4, T5, T6, R> {
(v1: T1, v2: T2, v3: T3): CurriedFunction3<T4, T5, T6, R>;
(_1: PH, v2: T2): CurriedFunction5<T1, T3, T4, T5, T6, R>;
(v1: T1, v2: T2): CurriedFunction4<T3, T4, T5, T6, R>;
<$SEL extends "111101">(): (v1: T1, v2: T2, v3: T3, v4: T4, _5: PH, v6: T6) => CurriedFunction1<T5, R>;
<$SEL extends "111011">(): (v1: T1, v2: T2, v3: T3, _4: PH, v5: T5, v6: T6) => CurriedFunction1<T4, R>;
<$SEL extends "111001">(): (v1: T1, v2: T2, v3: T3, _4: PH, _5: PH, v6: T6) => CurriedFunction2<T4, T5, R>;
<$SEL extends "110111">(): (v1: T1, v2: T2, _3: PH, v4: T4, v5: T5, v6: T6) => CurriedFunction1<T3, R>;
<$SEL extends "110101">(): (v1: T1, v2: T2, _3: PH, v4: T4, _5: PH, v6: T6) => CurriedFunction2<T3, T5, R>;
<$SEL extends "110011">(): (v1: T1, v2: T2, _3: PH, _4: PH, v5: T5, v6: T6) => CurriedFunction2<T3, T4, R>;
<$SEL extends "110001">(): (v1: T1, v2: T2, _3: PH, _4: PH, _5: PH, v6: T6) => CurriedFunction3<T3, T4, T5, R>;
<$SEL extends "101111">(): (v1: T1, _2: PH, v3: T3, v4: T4, v5: T5, v6: T6) => CurriedFunction1<T2, R>;
<$SEL extends "101101">(): (v1: T1, _2: PH, v3: T3, v4: T4, _5: PH, v6: T6) => CurriedFunction2<T2, T5, R>;
<$SEL extends "101011">(): (v1: T1, _2: PH, v3: T3, _4: PH, v5: T5, v6: T6) => CurriedFunction2<T2, T4, R>;
<$SEL extends "101001">(): (v1: T1, _2: PH, v3: T3, _4: PH, _5: PH, v6: T6) => CurriedFunction3<T2, T4, T5, R>;
<$SEL extends "100111">(): (v1: T1, _2: PH, _3: PH, v4: T4, v5: T5, v6: T6) => CurriedFunction2<T2, T3, R>;
<$SEL extends "100101">(): (v1: T1, _2: PH, _3: PH, v4: T4, _5: PH, v6: T6) => CurriedFunction3<T2, T3, T5, R>;
<$SEL extends "100011">(): (v1: T1, _2: PH, _3: PH, _4: PH, v5: T5, v6: T6) => CurriedFunction3<T2, T3, T4, R>;
<$SEL extends "100001">(): (v1: T1, _2: PH, _3: PH, _4: PH, _5: PH, v6: T6) => CurriedFunction4<T2, T3, T4, T5, R>;
<$SEL extends "011111">(): (_1: PH, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => CurriedFunction1<T1, R>;
<$SEL extends "011101">(): (_1: PH, v2: T2, v3: T3, v4: T4, _5: PH, v6: T6) => CurriedFunction2<T1, T5, R>;
<$SEL extends "011011">(): (_1: PH, v2: T2, v3: T3, _4: PH, v5: T5, v6: T6) => CurriedFunction2<T1, T4, R>;
<$SEL extends "011001">(): (_1: PH, v2: T2, v3: T3, _4: PH, _5: PH, v6: T6) => CurriedFunction3<T1, T4, T5, R>;
<$SEL extends "010111">(): (_1: PH, v2: T2, _3: PH, v4: T4, v5: T5, v6: T6) => CurriedFunction2<T1, T3, R>;
<$SEL extends "010101">(): (_1: PH, v2: T2, _3: PH, v4: T4, _5: PH, v6: T6) => CurriedFunction3<T1, T3, T5, R>;
<$SEL extends "010011">(): (_1: PH, v2: T2, _3: PH, _4: PH, v5: T5, v6: T6) => CurriedFunction3<T1, T3, T4, R>;
<$SEL extends "010001">(): (_1: PH, v2: T2, _3: PH, _4: PH, _5: PH, v6: T6) => CurriedFunction4<T1, T3, T4, T5, R>;
<$SEL extends "001111">(): (_1: PH, _2: PH, v3: T3, v4: T4, v5: T5, v6: T6) => CurriedFunction2<T1, T2, R>;
<$SEL extends "001101">(): (_1: PH, _2: PH, v3: T3, v4: T4, _5: PH, v6: T6) => CurriedFunction3<T1, T2, T5, R>;
<$SEL extends "001011">(): (_1: PH, _2: PH, v3: T3, _4: PH, v5: T5, v6: T6) => CurriedFunction3<T1, T2, T4, R>;
<$SEL extends "001001">(): (_1: PH, _2: PH, v3: T3, _4: PH, _5: PH, v6: T6) => CurriedFunction4<T1, T2, T4, T5, R>;
<$SEL extends "000111">(): (_1: PH, _2: PH, _3: PH, v4: T4, v5: T5, v6: T6) => CurriedFunction3<T1, T2, T3, R>;
<$SEL extends "000101">(): (_1: PH, _2: PH, _3: PH, v4: T4, _5: PH, v6: T6) => CurriedFunction4<T1, T2, T3, T5, R>;
<$SEL extends "000011">(): (_1: PH, _2: PH, _3: PH, _4: PH, v5: T5, v6: T6) => CurriedFunction4<T1, T2, T3, T4, R>;
<$SEL extends "000001">(): (_1: PH, _2: PH, _3: PH, _4: PH, _5: PH, v6: T6) => CurriedFunction5<T1, T2, T3, T4, T5, R>;
<$SEL extends "111111">(): (v1: T1, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => R;
<$SEL extends "11101">(): (v1: T1, v2: T2, v3: T3, _4: PH, v5: T5) => CurriedFunction2<T4, T6, R>;
<$SEL extends "11011">(): (v1: T1, v2: T2, _3: PH, v4: T4, v5: T5) => CurriedFunction2<T3, T6, R>;
<$SEL extends "11001">(): (v1: T1, v2: T2, _3: PH, _4: PH, v5: T5) => CurriedFunction3<T3, T4, T6, R>;
<$SEL extends "10111">(): (v1: T1, _2: PH, v3: T3, v4: T4, v5: T5) => CurriedFunction2<T2, T6, R>;
<$SEL extends "10101">(): (v1: T1, _2: PH, v3: T3, _4: PH, v5: T5) => CurriedFunction3<T2, T4, T6, R>;
<$SEL extends "10011">(): (v1: T1, _2: PH, _3: PH, v4: T4, v5: T5) => CurriedFunction3<T2, T3, T6, R>;
<$SEL extends "10001">(): (v1: T1, _2: PH, _3: PH, _4: PH, v5: T5) => CurriedFunction4<T2, T3, T4, T6, R>;
<$SEL extends "01111">(): (_1: PH, v2: T2, v3: T3, v4: T4, v5: T5) => CurriedFunction2<T1, T6, R>;
<$SEL extends "01101">(): (_1: PH, v2: T2, v3: T3, _4: PH, v5: T5) => CurriedFunction3<T1, T4, T6, R>;
<$SEL extends "01011">(): (_1: PH, v2: T2, _3: PH, v4: T4, v5: T5) => CurriedFunction3<T1, T3, T6, R>;
<$SEL extends "01001">(): (_1: PH, v2: T2, _3: PH, _4: PH, v5: T5) => CurriedFunction4<T1, T3, T4, T6, R>;
<$SEL extends "00111">(): (_1: PH, _2: PH, v3: T3, v4: T4, v5: T5) => CurriedFunction3<T1, T2, T6, R>;
<$SEL extends "00101">(): (_1: PH, _2: PH, v3: T3, _4: PH, v5: T5) => CurriedFunction4<T1, T2, T4, T6, R>;
<$SEL extends "00011">(): (_1: PH, _2: PH, _3: PH, v4: T4, v5: T5) => CurriedFunction4<T1, T2, T3, T6, R>;
<$SEL extends "00001">(): (_1: PH, _2: PH, _3: PH, _4: PH, v5: T5) => CurriedFunction5<T1, T2, T3, T4, T6, R>;
<$SEL extends "11111">(): (v1: T1, v2: T2, v3: T3, v4: T4, v5: T5) => CurriedFunction1<T6, R>;
<$SEL extends "1101">(): (v1: T1, v2: T2, _3: PH, v4: T4) => CurriedFunction3<T3, T5, T6, R>;
<$SEL extends "1011">(): (v1: T1, _2: PH, v3: T3, v4: T4) => CurriedFunction3<T2, T5, T6, R>;
<$SEL extends "1001">(): (v1: T1, _2: PH, _3: PH, v4: T4) => CurriedFunction4<T2, T3, T5, T6, R>;
<$SEL extends "0111">(): (_1: PH, v2: T2, v3: T3, v4: T4) => CurriedFunction3<T1, T5, T6, R>;
<$SEL extends "0101">(): (_1: PH, v2: T2, _3: PH, v4: T4) => CurriedFunction4<T1, T3, T5, T6, R>;
<$SEL extends "0011">(): (_1: PH, _2: PH, v3: T3, v4: T4) => CurriedFunction4<T1, T2, T5, T6, R>;
<$SEL extends "0001">(): (_1: PH, _2: PH, _3: PH, v4: T4) => CurriedFunction5<T1, T2, T3, T5, T6, R>;
<$SEL extends "1111">(): (v1: T1, v2: T2, v3: T3, v4: T4) => CurriedFunction2<T5, T6, R>;
<$SEL extends "101">(): (v1: T1, _2: PH, v3: T3) => CurriedFunction4<T2, T4, T5, T6, R>;
<$SEL extends "011">(): (_1: PH, v2: T2, v3: T3) => CurriedFunction4<T1, T4, T5, T6, R>;
<$SEL extends "001">(): (_1: PH, _2: PH, v3: T3) => CurriedFunction5<T1, T2, T4, T5, T6, R>;
<$SEL extends "111">(): (v1: T1, v2: T2, v3: T3) => CurriedFunction3<T4, T5, T6, R>;
<$SEL extends "01">(): (_1: PH, v2: T2) => CurriedFunction5<T1, T3, T4, T5, T6, R>;
<$SEL extends "11">(): (v1: T1, v2: T2) => CurriedFunction4<T3, T4, T5, T6, R>;
<$SEL extends "1">(): (v1: T1) => CurriedFunction5<T2, T3, T4, T5, T6, R>;
(v1: T1): CurriedFunction5<T2, T3, T4, T5, T6, R>;
}
4 changes: 2 additions & 2 deletions templates/$curried-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {create_curried_interfaces} from './utils/create-curried-interfaces';

export const max_curry_level = 6;

export default [
export default (selectable: boolean, placeholder: boolean) => [
dts.create_import_named({
members: [
dts.create_import_member({
Expand All @@ -15,7 +15,7 @@ export default [
from: './$placeholder',
}),
...dts.parse(`export type CurriedFunction0<R> = () => R;`).members,
...create_curried_interfaces(max_curry_level).map(
...create_curried_interfaces(max_curry_level, selectable, placeholder).map(
the_interface => ({
...the_interface,
export: true,
Expand Down
2 changes: 2 additions & 0 deletions templates/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- `$curried-functions.ts`: special codegen types without jsdoc binding

- `*.r.ts`: manual constant with jsdoc binding
- `*.d.ts`: manual funciton prototypes with jsdoc binding and auto-currying
- `*.c.ts`: codegen funciton prototypes with jsdoc binding and auto-currying
Expand Down
11 changes: 9 additions & 2 deletions templates/utils/create-curried-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import {
get_curried_interface_parameter_placeholder_name,
placeholder_name_abbr,
} from './constants';
import {create_selectable_signatures} from './create-selectable-signatures';
import {push_signatures} from './push-signatures';
import {sort_signatures} from './sort-signatures';

export const create_curried_interfaces = (max_curry_level: number) => {
export const create_curried_interfaces = (max_curry_level: number, selectable = true, placeholder = true) => {
const generics = [...new Array(max_curry_level)].map((_, index) =>
dts.create_generic_declaration({
name: get_curried_interface_generic_name(index),
Expand Down Expand Up @@ -47,7 +48,9 @@ export const create_curried_interfaces = (max_curry_level: number) => {
interfaces.forEach((the_interface, index) => {
push_signatures(
parameters.slice(0, index + 1),
placeholders.slice(0, index + 1),
placeholder
? placeholders.slice(0, index + 1)
: [],
(used_parameters, return_parameters) => {
the_interface.type!.members!.push(dts.create_object_member({
owned: dts.create_function_declaration({
Expand All @@ -70,6 +73,10 @@ export const create_curried_interfaces = (max_curry_level: number) => {
);
const object_type = interfaces[index].type!;
object_type.members = sort_signatures(object_type.members as dts.IObjectMember[]);

if (selectable && object_type.members.length > 1) {
object_type.members.splice(-1, 0, ...create_selectable_signatures(object_type.members as dts.IObjectMember[]));
}
});

return interfaces;
Expand Down

0 comments on commit f846073

Please sign in to comment.