(node: Undone<N.ImportDeclaration>)
| 2921 | } |
| 2922 | |
| 2923 | checkImportPhase(node: Undone<N.ImportDeclaration>) { |
| 2924 | if (node.phase == null) { |
| 2925 | return; |
| 2926 | } |
| 2927 | const { specifiers } = node; |
| 2928 | const singleBindingType = |
| 2929 | specifiers.length === 1 ? specifiers[0].type : null; |
| 2930 | |
| 2931 | if (node.phase === "source") { |
| 2932 | if (singleBindingType !== "ImportDefaultSpecifier") { |
| 2933 | this.raise(Errors.SourcePhaseImportRequiresDefault, node); |
| 2934 | } |
| 2935 | } else if (node.phase === "defer") { |
| 2936 | if (singleBindingType !== "ImportNamespaceSpecifier") { |
| 2937 | this.raise(Errors.DeferImportRequiresNamespace, node); |
| 2938 | } |
| 2939 | } |
| 2940 | } |
| 2941 | |
| 2942 | isPotentialImportPhase(isExport: boolean): boolean { |
| 2943 | if (isExport) { |
nothing calls this directly
no outgoing calls
no test coverage detected