GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [isolatedDeclarations] function expressions as an argument to a function call that is exported are reported as needing an annotation · Issue #62085 · microsoft/TypeScript Open Labels Domain: flag: isolatedDeclarationsRelated to the --isolatedDeclarations compiler flagPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases Milestone Description🔎 Search Terms"isolatedDeclarations", "function return type", "exported variable" 🕗 Version & Regression Information
⏯ Playground Link💻 Codeimport * as React from 'react'; import { action } from 'mobx'; import { observer } from 'mobx-react'; export const Component = observer(() => { return <></>; }); export const thing = action(function () { return Component; }); 🙁 Actual behaviorimport * as React from 'react'; import { action } from 'mobx'; import { observer } from 'mobx-react'; export const Component = observer(() => { ~~~~~~~~~ Variable must have an explicit type annotation with --isolatedDeclarations. ~~~~~ Function must have an explicit return type annotation with --isolatedDeclarations. return <></>; }); export const thing = action(function () { ~~~~~ Variable must have an explicit type annotation with --isolatedDeclarations. ~~~~~~~~ Function must have an explicit return type annotation with --isolatedDeclarations. return Component; }); 🙂 Expected behaviorimport * as React from 'react'; import { action } from 'mobx'; import { observer } from 'mobx-react'; export const Component = observer(() => { ~~~~~~~~~ Variable must have an explicit type annotation with --isolatedDeclarations. return <></>; }); export const thing = action(function () { ~~~~~ Variable must have an explicit type annotation with --isolatedDeclarations. return Component; }); Additional information about the issueThe function expressions are not directly exported so they should not be reported on at all. Reacted by Rob Palmer Reacted by Copilot Activity
MetadataMetadataAssigneesLabelsDomain: flag: isolatedDeclarationsRelated to the --isolatedDeclarations compiler flagPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |