Skip to content
This repository was archived by the owner on Feb 20, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"tslint-config-prettier-ext": "1.5.0",
"tslint-plugin-prettier": "1.3.0",
"typedoc": "0.11.1",
"typescript": "2.5.3"
"typescript": "2.8.3"
},
"peerDependencies": {
"dts-element": "^2.2.0"
Expand Down
8 changes: 5 additions & 3 deletions src/create-curried-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ export interface CreateCurriedDeclarationsOptions
export function create_curried_types(
name: string,
type: dts.IFunctionType,
// istanbul ignore next
options: CreateCurriedDeclarationsOptions = {},
options?: CreateCurriedDeclarationsOptions,
): dts.ITypeDeclaration[] {
// istanbul ignore next
const $options: CreateCurriedDeclarationsOptions =
options !== undefined ? options : {};
// istanbul ignore next
const {
selectable = selectable_default,
placeholder = placeholder_default,
Expand All @@ -47,7 +49,7 @@ export function create_curried_types(
get_selectable_kind_name,
get_selectable_selector_name,
inline_return_type = inline_return_type_default,
} = options;
} = $options;

const is_placeholder = (value: dts.IType) =>
dts.is_general_type(value) && value.name === get_placeholder_type();
Expand Down
4 changes: 2 additions & 2 deletions src/create-curried-various-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ export function create_various_curried_types(
}
const repeated_function_types: { [name: string]: dts.IFunctionType } = {};
const members: dts.IObjectMember[] = [];
object_type.members!.forEach(
(member: dts.IObjectMember, member_index, origin_members) => {
(object_type.members as dts.IObjectMember[]).forEach(
(member, member_index, origin_members) => {
const function_type = (member.owned as dts.IFunctionDeclaration).type!;
const function_return_type = function_type.return! as dts.IGeneralType;
if (function_return_type.name in non_conflict_rebases) {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3725,14 +3725,14 @@ [email protected]:
typedoc-default-themes "^0.5.0"
typescript "2.7.2"

[email protected]:
version "2.5.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d"

[email protected]:
version "2.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836"

[email protected]:
version "2.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170"

typescript@~2.4.1:
version "2.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844"
Expand Down