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

Gracefully handle non-string inputs #9

Merged
merged 10 commits into from Nov 13, 2019

Conversation

MaximDevoir
Copy link
Contributor

@MaximDevoir MaximDevoir commented Oct 22, 2019

Closes #8

readme.md Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
MaximDevoir and others added 4 commits October 23, 2019 06:03
Co-Authored-By: Sindre Sorhus <sindresorhus@gmail.com>
Co-Authored-By: Sindre Sorhus <sindresorhus@gmail.com>
See the associated [review conversation](sindresorhus#9 (comment)) for why `--strictNullChecks` is required.

Co-Authored-By: Sindre Sorhus <sindresorhus@gmail.com>
Co-Authored-By: Sindre Sorhus <sindresorhus@gmail.com>
tsconfig.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
MaximDevoir and others added 2 commits October 24, 2019 16:36
Co-Authored-By: Sindre Sorhus <sindresorhus@gmail.com>
@MaximDevoir
Copy link
Contributor Author

The tests pass without TSConfig while VSCode gives a warning because of the default --strictNullChecks being false.

vscode-no-tsconfig

@MaximDevoir
Copy link
Contributor Author

MaximDevoir commented Oct 25, 2019

My guess is TSD has --strictNullChecks enabled by default.

edit: Yes, TSD has strict mode enabled by default (link) - which is why this error does not appear when running the test script.

@MaximDevoir
Copy link
Contributor Author

We should keep TSConfig withstrict mode enabled to remove errors during detect-newline package development. Nothing has to be added to files in package.json - it's already setup.

@sindresorhus sindresorhus merged commit 4fb2614 into sindresorhus:master Nov 13, 2019
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.

.graceful() method should return \n when given null
2 participants