-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Add more documentation to vscode-uri to illustrate usage #56108
Labels
feature-request
Request for new features or functionality
uri
verification-needed
Verification of issue is requested
verified
Verification succeeded
Milestone
Comments
It is pretty simply but we should probably do a deep dive, the most documentation can be found on /**
* Create an URI from a file system path. The [scheme](#Uri.scheme)
* will be `file`.
*
* @param path A file system or UNC path.
* @return A new Uri instance.
*/
static file(path: string): Uri;
/**
* Create an URI from a string. Will throw if the given value is not
* valid.
*
* @param value The string value of an Uri.
* @return A new Uri instance.
*/
static parse(value: string): Uri; |
And to clarify what the five components are: /**
* Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
* This class is a simple parser which creates the basic component paths
* (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
* and encoding.
*
* foo://example.com:8042/over/there?name=ferret#nose
* \_/ \______________/\_________/ \_________/ \__/
* | | | | |
* scheme authority path query fragment
* | _____________________|__
* / \ / \
* urn:example:animal:ferret:nose
*
*
*/
export default class URI implements UriComponents { |
jrieken
added a commit
that referenced
this issue
Aug 10, 2018
jrieken
added a commit
that referenced
this issue
Aug 10, 2018
jrieken
added a commit
that referenced
this issue
Aug 10, 2018
jrieken
added a commit
that referenced
this issue
Aug 13, 2018
jrieken
added a commit
that referenced
this issue
Aug 15, 2018
jrieken
added a commit
that referenced
this issue
Aug 16, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
feature-request
Request for new features or functionality
uri
verification-needed
Verification of issue is requested
verified
Verification succeeded
Previously I had misunderstanding of how to use
vscode-uri
(#42658),and recently we have #55891 and #56104.
We need some documentation for
Uri.parse
andUri.file
to knowUri.file
take/c:/foo
, orC:\foo
, or/C:\foo
? On macOS/Linux, does it take relative paths or only absolute paths?also for
path
andfsPath
:They should be in JSDocs so it shows up in IntelliSense. Would be great to have them in the
vscode-uri
readme too.The text was updated successfully, but these errors were encountered: