Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update type definition for function #177

Merged
merged 7 commits into from
Apr 11, 2023

Conversation

ryota2357
Copy link
Contributor

#44

The minimum version supported by denops.vim has been raised, resulting in changes to the type definitions and documentation for some functions.

This PR is a update of the type definitions and documentation for those functions that were already typed.

@ryota2357 ryota2357 marked this pull request as ready for review April 7, 2023 04:46
denops_std/function/common.ts Outdated Show resolved Hide resolved
denops_std/function/cursor.ts Show resolved Hide resolved
denops_std/function/cursor.ts Show resolved Hide resolved
denops_std/function/input.ts Outdated Show resolved Hide resolved
denops_std/function/input.ts Outdated Show resolved Hide resolved
@ryota2357 ryota2357 force-pushed the update-typedef branch 3 times, most recently from 671f4b3 to c7f2209 Compare April 8, 2023 13:40
Copy link
Contributor

@Milly Milly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -46,6 +46,8 @@ test({
assertNumber(await cursor.line(denops, "."));
assertEquals(await cursor.line(denops, "."), 1);
assertEquals(await cursor.line(denops, "$"), 3);
assertNumber(await cursor.line(denops, ".", 1000));
assertEquals(await cursor.line(denops, ".", 1000), 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should

We have no guarantee that the current winid is 1000. We need to get a correct one first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.
I changed to use bufwinid("%") to get current winid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this part is not fixed yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I fixed it.

Comment on lines +9 to +14
export type PropAddListItem = [
lnum: number,
col: number,
end_lnum: number,
end_col: number,
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭

I didn't know that we can annotate each tuple elements. Could you share the URL for this spec with me if you have one (This is just my interest so just ignore if you don't have it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -46,6 +46,8 @@ test({
assertNumber(await cursor.line(denops, "."));
assertEquals(await cursor.line(denops, "."), 1);
assertEquals(await cursor.line(denops, "$"), 3);
assertNumber(await cursor.line(denops, ".", 1000));
assertEquals(await cursor.line(denops, ".", 1000), 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this part is not fixed yet.

@lambdalisue lambdalisue merged commit cf25ec0 into vim-denops:main Apr 11, 2023
@ryota2357 ryota2357 deleted the update-typedef branch May 12, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants