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