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: support intrinsic string manipulation types #1173
Conversation
See: [TypeScript: Documentation - Intrinsic String Manipulation Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#intrinsic-string-manipulation-types)
@@ -14,6 +14,10 @@ indent_size = 4 | |||
indent_style = space | |||
indent_size = 4 | |||
|
|||
[test/**/schema.json] |
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.
I added this rule because the editor kept changing the indent of schema.json
files to 4.
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.
We could probably remove this file since we enforce style through prettier already. The editorconfig doesn't add much benefit anymore, I think.
@@ -4,6 +4,33 @@ | |||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |||
"version": "0.2.0", | |||
"configurations": [ | |||
{ | |||
// | |||
// Helps with debugging parsing. |
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.
This launch configuration made it much easier for me to debug my changes. I would just open the main.ts
file I wanted to parse and run the debugger.
I leave it up to you if you want to keep it.
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.
That's great!
@@ -0,0 +1,7 @@ | |||
import { LogicError } from "../Error/LogicError"; | |||
|
|||
export default function assert(value: unknown, message: string): asserts value { |
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.
I added this method to make test coverage easier. It wasn't possible to make a main.ts
sample to cause the assumptions about the compiler to trigger. So, I took this route to I can assert that the assumptions about the compiler are still true while being able to catch future incompatibilities.
Thank you! |
See: TypeScript: Documentation - Intrinsic String Manipulation Types