-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: assertion functions #107
Conversation
Signed-off-by: Wouter Termont <[email protected]>
Signed-off-by: Wouter Termont <[email protected]>
Signed-off-by: Wouter Termont <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Consider the following:
let variable: string;
variable = functionThatMightReturnUndefined();
assert(!isUndefined(variable)); // yes?
someOtherFunction(variable); // this function's param is required
Will TS complain about someOtherFunction
having an object that is possibly undefined
or does it recognize it can't be after the assert
(the same way a simple if (!variable)
does)? Asking because I've had to put in a lot of these if
s lately by enabling strict mode in NDE's core package. (most of the inrupt sdk's data function return Thing | null
)
registry=https://registry.npmjs.org/ | ||
|
||
@digita-ai:registry=https://npm.pkg.github.com | ||
//npm.pkg.github.com/:_authToken=${NPM_TOKEN} | ||
always-auth=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR in specific but these .npmrc files can be removed if we all npm login
once with the access token which is currently in $NPM_TOKEN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that go for all .nmprc
files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All .npmrc
files, but looks like they should still exist, just not contain the authToken
stuff.
See https://github.com/netwerk-digitaal-erfgoed/solid-crs/blob/master/.npmrc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But should probably be its own issue in another repo (or all repos)
About your example, @lem-onade: while you'll probably have to use |
Signed-off-by: Wouter Termont <[email protected]>
Signed-off-by: Wouter Termont <[email protected]>
…ai/dgt-shared into feat/assertion-functions
Signed-off-by: Wouter Termont <[email protected]>
Signed-off-by: Wouter Termont <[email protected]>
Signed-off-by: Wouter Termont [email protected]