Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 13.7k
Isolated declarations#53463
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
Uh oh!
There was an error while loading. Please reload this page.
Isolated declarations #53463
Changes from all commits
0a1f10115b7e603a3e7e5220fb0d6e866ca8ab3fcb7f574a8b97e79fc509a6ce4cf7a04a66f33adb25b1a8377465d88b4e902f5eed653203cc478de643d33c40f9a5882dfd3b49025f5580be4ccd8feab7781968cb280cc3d9503d63c219db81cdc02af866d3ec90b07800241fe34c8799425512f04c7a0dd34fe1a1d0bd7ca64352d309c69767aa900d340dfaa3cf1e772096f1f82f9dde8cb6aeeb920b0d064d35d400eaac2f675904193570f403c6b60fc86d5751276f9ed9416f3824a5f539c274fd60960f8c474481192982ebee8fa8c0b63bf62fd7be57d243a0dfdee19b2fb26363e9d1430bedc035429c1f857967abf074303b99161b1ea73b8e896da9b9c21e1415032d02cc72451bbae1646eb50c87710724ec98fb92a3077592fb324e56c2a8d3e9ca3d45c82583a7c15af5e2e6d0e878ebd981e948ef231d96faac4f852c2a82c8eaf524fd81004cedfe46e9453a4bec21c20406f1c7972f87ad092d39005283ae26a011f142883cc69ae61dd6d6f9d2d9c80f76ea7b82a36e55054a4312f5a7784c9856f97e1a23043936d4aa406046ffe4b1c3023b9f9a3db9c9dc09cafca6fb135ccc67767f0fe57f21b191c8b76e45e9b8c236425286299193912bbf086f35672a57a1074f9aeeb8a9fb7d062a6f3a0ec23840f496c9c152dfc9d1867e10031990579ca6342d4e86541d882e1cf214ae9c19913da557b024d8a3ca8c29dcc0d67266ca0b260f12363cf1ca9892b3dcb26e95747ab0f0d70673074e01096c0831c2d9328ead89c2ae500d2a3af1e6fa8dcb2727bffe7e31370b0f7a65aa142ff2b62318bf69d991a45547961b4c121898eb0ffb08ff8261eba52c0bf81d91c282f1cfac4a0f31ee901c7e3e18d2e8c5ddc9bafaec96211b05697161e0a6fe9fcf49ebd95531cef970c397c45ffaffcfb69866b6ac103135a77133c47d1f598a20c53519ecd15f3f0ca544164b9bd99cdf5857f90ba3a5049202d522be73e33c223e05b7d936c7776b34c3c863da97dfbc04097f671131db8e9f0f552158b5999d03e5a1db4fd0972668b4221e868f2504097ae1c0b4867f0fad1b7cf4447ef6a8680ad28473b6033bd27c7847c4dbedc3245bbb2706e027ff8b22164696e2e6adc6987970b2b946c2b27f4347374f36803a00edc4d32f65c3b65ff13fb8347b23373aaf4163e4ba571e43fe7ad116a81b583418f9753188a82e1bb300dc1ffe9a9d06d7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Diff view
Diff view
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -6227,6 +6227,11 @@ | ||||||
| "category": "Message", | ||||||
| "code": 6718 | ||||||
| }, | ||||||
| "Ensure that each file can have declaration emit generated without type information": { | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
? ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both of these are true. it does allow one file at a time declaration emit, but it also ensures that not types need to be created by the type checker. I feel the latter constraint is the stricter one since it forbids most inference even if the information is available in the file. Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think what’s going on in | ||||||
| "category": "Message", | ||||||
| "code": 6719 | ||||||
| }, | ||||||
| "Default catch clause variables as 'unknown' instead of 'any'.": { | ||||||
| "category": "Message", | ||||||
| "code": 6803 | ||||||
| @@ -6741,6 +6746,130 @@ | ||||||
| "category": "Error", | ||||||
| "code": 9006 | ||||||
| }, | ||||||
| "Function must have an explicit return type annotation with --isolatedDeclarations.": { | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit:
Suggested change
is the typical style. My ear also slightly prefers | ||||||
| "category": "Error", | ||||||
| "code": 9007 | ||||||
| }, | ||||||
| "Method must have an explicit return type annotation with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9008 | ||||||
| }, | ||||||
| "At least one accessor must have an explicit return type annotation with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9009 | ||||||
| }, | ||||||
| "Variable must have an explicit type annotation with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9010 | ||||||
| }, | ||||||
| "Parameter must have an explicit type annotation with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9011 | ||||||
| }, | ||||||
| "Property must have an explicit type annotation with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9012 | ||||||
| }, | ||||||
| "Expression type can't be inferred with --isolatedDeclarations.": { | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: “cannot” is typical | ||||||
| "category": "Error", | ||||||
| "code": 9013 | ||||||
| }, | ||||||
| "Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9014 | ||||||
| }, | ||||||
| "Objects that contain spread assignments can't be inferred with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9015 | ||||||
| }, | ||||||
| "Objects that contain shorthand properties can't be inferred with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9016 | ||||||
| }, | ||||||
| "Only const arrays can be inferred with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9017 | ||||||
| }, | ||||||
| "Arrays with spread elements can't inferred with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9018 | ||||||
| }, | ||||||
| "Binding elements can't be exported directly with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9019 | ||||||
| }, | ||||||
| "Enum member initializers must be computable without references to external symbols with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9020 | ||||||
| }, | ||||||
| "Extends clause can't contain an expression with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9021 | ||||||
| }, | ||||||
| "Inference from class expressions is not supported with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9022 | ||||||
| }, | ||||||
| "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function.": { | ||||||
| "category": "Error", | ||||||
| "code": 9023 | ||||||
| }, | ||||||
| "Declaration emit for this file requires adding a type reference directive which are not supported with --isolatedDeclarations": { | ||||||
| "category": "Error", | ||||||
| "code": 9024 | ||||||
| }, | ||||||
| "Reference directives are not supported with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9025 | ||||||
| }, | ||||||
| "Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9026 | ||||||
| }, | ||||||
| "Add a type annotation to the variable {0}.": { | ||||||
| "category": "Error", | ||||||
| "code": 9027 | ||||||
| }, | ||||||
| "Add a type annotation to the parameter {0}.": { | ||||||
| "category": "Error", | ||||||
| "code": 9028 | ||||||
| }, | ||||||
| "Add a type annotation to the property {0}.": { | ||||||
| "category": "Error", | ||||||
| "code": 9029 | ||||||
| }, | ||||||
| "Add a return type to the function expression.": { | ||||||
| "category": "Error", | ||||||
| "code": 9030 | ||||||
| }, | ||||||
| "Add a return type to the function declaration.": { | ||||||
| "category": "Error", | ||||||
| "code": 9031 | ||||||
| }, | ||||||
| "Add a return type to the get accessor declaration.": { | ||||||
| "category": "Error", | ||||||
| "code": 9032 | ||||||
| }, | ||||||
| "Add a type to parameter of the set accessor declaration.": { | ||||||
| "category": "Error", | ||||||
| "code": 9033 | ||||||
| }, | ||||||
| "Add a return type to the method": { | ||||||
| "category": "Error", | ||||||
| "code": 9034 | ||||||
| }, | ||||||
| "Add a type assertion to this expression to make type type explicit.": { | ||||||
| "category": "Error", | ||||||
| "code": 9035 | ||||||
| }, | ||||||
| "Move the expression in default export to a variable and add a type annotation to it.": { | ||||||
| "category": "Error", | ||||||
| "code": 9036 | ||||||
| }, | ||||||
| "Default exports can't be inferred with --isolatedDeclarations.": { | ||||||
| "category": "Error", | ||||||
| "code": 9037 | ||||||
| }, | ||||||
| "JSX attributes must only be assigned a non-empty 'expression'.": { | ||||||
| "category": "Error", | ||||||
| "code": 17000 | ||||||
| @@ -7055,6 +7184,42 @@ | ||||||
| "category": "Message", | ||||||
| "code": 90060 | ||||||
| }, | ||||||
| "Add annotation of type '{0}'": { | ||||||
| "category": "Message", | ||||||
| "code": 90061 | ||||||
| }, | ||||||
| "Add return type '{0}'": { | ||||||
| "category": "Message", | ||||||
| "code": 90062 | ||||||
| }, | ||||||
| "Extract base class to variable": { | ||||||
| "category": "Message", | ||||||
| "code": 90064 | ||||||
| }, | ||||||
| "Extract default export to variable": { | ||||||
| "category": "Message", | ||||||
| "code": 90065 | ||||||
| }, | ||||||
| "Extract binding expressions to variable": { | ||||||
| "category": "Message", | ||||||
| "code": 90066 | ||||||
| }, | ||||||
| "Add all missing type annotations": { | ||||||
| "category": "Message", | ||||||
| "code": 90067 | ||||||
| }, | ||||||
| "Add inline type assertion to '{0}'": { | ||||||
| "category": "Message", | ||||||
| "code": 90068 | ||||||
| }, | ||||||
| "Extract to variable and replace with '{0} typeof {0}'": { | ||||||
| "category": "Message", | ||||||
| "code": 90069 | ||||||
| }, | ||||||
| "Mark array literal as const": { | ||||||
| "category": "Message", | ||||||
| "code": 90070 | ||||||
| }, | ||||||
| "Convert function to an ES2015 class": { | ||||||
| "category": "Message", | ||||||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.