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

fix(types): fix Finder item url definition #29

Merged
merged 1 commit into from
Oct 8, 2020
Merged

fix(types): fix Finder item url definition #29

merged 1 commit into from
Oct 8, 2020

Conversation

Arinono
Copy link
Contributor

@Arinono Arinono commented Oct 7, 2020

I wanted to use the type Finder.Item in my mapping, but the type defines a URL whereas the actual syntax is lowercase.

    const files = Application<Finder>('Finder').selection()

    return files.map((f: {kind: () => string; url: () => string}) => ({ kind: f.kind(), path: f.url() }))

Screenshot 2020-10-07 at 10 53 21


EDIT: Just so you know, I changed the Finder.sdef manually. The real one has the key URL, but it doesn't work this way:
Screenshot 2020-10-07 at 11 45 17

@azu azu merged commit f2ac980 into JXA-userland:master Oct 8, 2020
@azu
Copy link
Member

azu commented Oct 8, 2020

Thanks!

@azu
Copy link
Member

azu commented Oct 8, 2020

v1.3.4 includes this fix.

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.

2 participants