Skip to content

Ts and update#1

Open
mariannefeng wants to merge 14 commits intomasterfrom
ts-and-update
Open

Ts and update#1
mariannefeng wants to merge 14 commits intomasterfrom
ts-and-update

Conversation

@mariannefeng
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@shankj3 shankj3 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for all the beautiful documentation!

return normalizeUrl(
path.replace(beginningSlashes, ''),
{
stripProtocol: true,
stripHash: true,
removeQueryParameters: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

just question -- why are we keeping in query params here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removeQueryParameters doesn't take in a boolean, it takes in a string regex. This line wasn't doing anything, so I took it out.

export const authorizePatch = getPhinClient(HTTPMethod.PATCH);

//we have to do this for delete because when delete returns 204 no content, phin client crashes
//waiting on PR https://github.com/ethanent/phin/pull/38
Copy link
Collaborator

Choose a reason for hiding this comment

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

😢

throw new Error('Invalid token response');
}

// set token expiration to be 2 minutes before stated expiration
Copy link
Collaborator

Choose a reason for hiding this comment

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

good move 🦺


type AsyncFunction = () => Promise<String>

export function jwt(oauthKey: string): AsyncFunction {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if there aren't comments here, do you still get the tooltip highlights on IDEs that render the jsdoc? i do like when they do that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh...no tooltip on hover yeah. I like it more too though! I'll move the comment I already wrote over the jwt/clientCredentials functions.

@mariannefeng mariannefeng requested a review from twardcox May 15, 2020 02:17
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