codefresh-io / node-docker-reference

A node.js package to parse a docker image reference
3 stars 2 forks source link

Convert to TypeScript #10

Open JamieMagee opened 2 years ago

JamieMagee commented 2 years ago

Thanks for updating this library with TypeScript types in #9, but they're not very specific. There is a lot of any used, and it's not much more useful than no types at all.

I'd be happy to contribute this, if it would be accepted.

Tagging @oleksandr-codefresh as you're the most recent maintainer of this project.

oleksandr-codefresh commented 2 years ago

@JamieMagee Hi, at least currently you can use exported class Reference to work with results and create you own wrapper over function

export function parseImageName(imageName: string): Reference {
    return parseFamiliarName(imageName, parseQualifiedNameOptimized)
}