auklet 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/build/bundleConfig.d.ts +1 -4
  2. package/dist/build/bundleConfig.js +59 -71
  3. package/dist/build/cleanOutput.d.ts +2 -8
  4. package/dist/build/cleanOutput.js +7 -7
  5. package/dist/build/moduleConfig.d.ts +1 -3
  6. package/dist/build/moduleConfig.js +21 -40
  7. package/dist/build/runTsdown.d.ts +2 -5
  8. package/dist/build/runTsdown.js +18 -23
  9. package/dist/build/tsdown/common.d.ts +17 -28
  10. package/dist/build/tsdown/common.js +22 -25
  11. package/dist/build/tsdown/context.d.ts +16 -20
  12. package/dist/build/tsdown/context.js +41 -45
  13. package/dist/build/tsdown/define.d.ts +2 -7
  14. package/dist/build/tsdown/define.js +13 -22
  15. package/dist/build/tsdown/dependencies.d.ts +4 -12
  16. package/dist/build/tsdown/dependencies.js +47 -51
  17. package/dist/build/tsdown/entries.d.ts +4 -6
  18. package/dist/build/tsdown/entries.js +39 -38
  19. package/dist/build/tsdown/parseModuleId.d.ts +4 -4
  20. package/dist/build/tsdown/parseModuleId.js +92 -77
  21. package/dist/build/tsdown/types.d.ts +24 -31
  22. package/dist/build/tsdownConfig.js +1 -4
  23. package/dist/config.d.ts +37 -37
  24. package/dist/config.js +38 -41
  25. package/dist/configLoader.d.ts +2 -7
  26. package/dist/configLoader.js +59 -64
  27. package/dist/css/config.js +8 -8
  28. package/dist/css/constants.d.ts +6 -6
  29. package/dist/css/core/resolvers/packageImports.d.ts +1 -5
  30. package/dist/css/core/resolvers/packageImports.js +35 -40
  31. package/dist/css/core/resolvers/relative.d.ts +1 -4
  32. package/dist/css/core/resolvers/relative.js +3 -2
  33. package/dist/css/core/resolvers/tsconfigPaths.d.ts +1 -5
  34. package/dist/css/core/resolvers/tsconfigPaths.js +59 -66
  35. package/dist/css/core/style/dependencies.d.ts +6 -16
  36. package/dist/css/core/style/dependencies.js +35 -38
  37. package/dist/css/core/style/entries.d.ts +35 -58
  38. package/dist/css/core/style/entries.js +20 -31
  39. package/dist/css/core/style/files.d.ts +2 -7
  40. package/dist/css/core/style/files.js +11 -11
  41. package/dist/css/core/style/specifier.d.ts +5 -8
  42. package/dist/css/core/style/specifier.js +21 -18
  43. package/dist/css/core/styleImports/collector.d.ts +17 -25
  44. package/dist/css/core/styleImports/collector.js +162 -201
  45. package/dist/css/core/styleImports/sourceReference.d.ts +8 -16
  46. package/dist/css/core/styleImports/sourceReference.js +153 -173
  47. package/dist/css/core/styleModuleEntryPlanner.d.ts +21 -24
  48. package/dist/css/core/styleModuleEntryPlanner.js +44 -61
  49. package/dist/css/core/stylePackageContext.d.ts +16 -20
  50. package/dist/css/core/stylePackageContext.js +33 -49
  51. package/dist/css/core/styleProcessor.js +105 -104
  52. package/dist/css/core/workspaceStyleResolver.d.ts +9 -15
  53. package/dist/css/core/workspaceStyleResolver.js +62 -72
  54. package/dist/css/production/builder.d.ts +9 -16
  55. package/dist/css/production/builder.js +51 -57
  56. package/dist/css/production/format/componentWriter.js +45 -66
  57. package/dist/css/production/format/entryWriter.js +36 -49
  58. package/dist/css/production/format/externalWriter.js +21 -33
  59. package/dist/css/production/format/moduleWriter.js +23 -26
  60. package/dist/css/production/format/shared.d.ts +8 -15
  61. package/dist/css/production/format/shared.js +5 -6
  62. package/dist/css/production/format/sourceWriter.js +11 -11
  63. package/dist/css/production/format/themeWriter.js +56 -71
  64. package/dist/css/production/moduleOutputWriter.d.ts +18 -21
  65. package/dist/css/production/moduleOutputWriter.js +56 -65
  66. package/dist/css/production/packageEntryWriter.d.ts +12 -15
  67. package/dist/css/production/packageEntryWriter.js +42 -45
  68. package/dist/css/vite/hmr.d.ts +11 -11
  69. package/dist/css/vite/hmr.js +93 -109
  70. package/dist/css/vite/moduleGraph/devDependency.d.ts +7 -12
  71. package/dist/css/vite/moduleGraph/devDependency.js +8 -8
  72. package/dist/css/vite/moduleGraph/graph.d.ts +20 -23
  73. package/dist/css/vite/moduleGraph/graph.js +46 -49
  74. package/dist/css/vite/moduleGraph/loadResult.d.ts +3 -5
  75. package/dist/css/vite/moduleGraph/loadResult.js +7 -9
  76. package/dist/css/vite/moduleGraph/packageSource/monorepo.d.ts +4 -6
  77. package/dist/css/vite/moduleGraph/packageSource/monorepo.js +59 -64
  78. package/dist/css/vite/moduleGraph/packageSource/types.d.ts +7 -7
  79. package/dist/css/vite/moduleGraph/requestCache.d.ts +46 -57
  80. package/dist/css/vite/moduleGraph/requestCache.js +53 -51
  81. package/dist/css/vite/moduleGraph/styleCodeFactory.d.ts +15 -18
  82. package/dist/css/vite/moduleGraph/styleCodeFactory.js +182 -263
  83. package/dist/css/vite/moduleGraph/styleId.d.ts +3 -6
  84. package/dist/css/vite/moduleGraph/styleId.js +12 -11
  85. package/dist/css/vite/moduleGraph/types.d.ts +11 -14
  86. package/dist/css/vite/vitePlugin.d.ts +16 -20
  87. package/dist/css/vite/vitePlugin.js +110 -109
  88. package/dist/css/watch/watcher.d.ts +15 -21
  89. package/dist/css/watch/watcher.js +83 -80
  90. package/dist/index.d.ts +3 -25
  91. package/dist/index.js +2 -9
  92. package/dist/types.d.ts +59 -62
  93. package/dist/utils.d.ts +3 -7
  94. package/dist/utils.js +50 -47
  95. package/package.json +31 -33
@@ -3,16 +3,8 @@ import path from 'node:path';
3
3
  import { isArray } from 'aidly';
4
4
  import { SOURCE_COMPONENT_MODULE_RE } from '#auklet/css/constants';
5
5
  import { joinDependencySpecifier } from '#auklet/css/core/style/specifier';
6
- import {
7
- appendUniqueMapValue,
8
- getSourceModuleDir,
9
- POSIX_SEPARATOR,
10
- } from '#auklet/utils';
11
- import {
12
- collectModuleStyleSourceReferences,
13
- getSourceReferenceImportedNames,
14
- isTypeOnlySourceReference,
15
- } from '#auklet/css/core/styleImports/sourceReference';
6
+ import { appendUniqueMapValue, getSourceModuleDir, POSIX_SEPARATOR, } from '#auklet/utils';
7
+ import { collectModuleStyleSourceReferences, getSourceReferenceImportedNames, isTypeOnlySourceReference, } from '#auklet/css/core/styleImports/sourceReference';
16
8
  import { resolveRelativeSourceImport } from '#auklet/css/core/resolvers/relative';
17
9
  import { resolvePackageImportsSourceImport } from '#auklet/css/core/resolvers/packageImports';
18
10
  import { resolveTsconfigPathsSourceImport } from '#auklet/css/core/resolvers/tsconfigPaths';
@@ -20,206 +12,175 @@ const GLOBSTAR_TOKEN = '**';
20
12
  const SOURCE_EXTENSION_RE = /\.(?:[cm]?[jt]s|[jt]sx)$/;
21
13
  const SOURCE_INDEX_RE = new RegExp(`[/\\\\]index${SOURCE_EXTENSION_RE.source}`);
22
14
  export class ModuleStyleImportCollector {
23
- srcRoot;
24
- packageRoot;
25
- resolver;
26
- styleExtensions;
27
- constructor(srcRoot, packageRoot, resolver, styleExtensions = ['.css']) {
28
- this.srcRoot = srcRoot;
29
- this.packageRoot = packageRoot;
30
- this.resolver = resolver;
31
- this.styleExtensions = styleExtensions;
32
- }
33
- collect(files, config) {
34
- const entries = new Map();
35
- const rules = this.createAutoImportRules(config);
36
- for (const file of files) {
37
- if (!SOURCE_COMPONENT_MODULE_RE.test(file)) {
38
- continue;
39
- }
40
- const sourceRelative = path.relative(this.srcRoot, file);
41
- const sourceDir = path.dirname(sourceRelative);
42
- const sourceModuleDir = getSourceModuleDir(sourceRelative);
43
- const code = fs.readFileSync(file, 'utf8');
44
- const imports = collectModuleStyleSourceReferences(file, code);
45
- for (const item of imports) {
46
- this.collectSourceImportStyle(
47
- entries,
48
- sourceDir,
49
- sourceModuleDir,
50
- item,
51
- );
52
- if (isTypeOnlySourceReference(item)) continue;
53
- const importPath = item.importPath;
54
- const ruleMatches = this.matchAutoImportRules(rules, importPath);
55
- if (!ruleMatches.length) continue;
56
- const directSpecifiers = ruleMatches.flatMap((ruleMatch) => {
57
- const specifier = this.createDirectStyleSpecifier(
58
- ruleMatch.rule,
59
- importPath,
60
- );
61
- return specifier ? [specifier] : [];
62
- });
63
- if (directSpecifiers.length) {
64
- for (const specifier of directSpecifiers) {
65
- const cssFile = this.resolver.resolveStyleDependency(specifier);
66
- if (fs.existsSync(cssFile)) {
67
- appendUniqueMapValue(entries, sourceModuleDir, specifier);
15
+ srcRoot;
16
+ packageRoot;
17
+ resolver;
18
+ styleExtensions;
19
+ constructor(srcRoot, packageRoot, resolver, styleExtensions = ['.css']) {
20
+ this.srcRoot = srcRoot;
21
+ this.packageRoot = packageRoot;
22
+ this.resolver = resolver;
23
+ this.styleExtensions = styleExtensions;
24
+ }
25
+ collect(files, config) {
26
+ const entries = new Map();
27
+ const rules = this.createAutoImportRules(config);
28
+ for (const file of files) {
29
+ if (!SOURCE_COMPONENT_MODULE_RE.test(file)) {
30
+ continue;
31
+ }
32
+ const sourceRelative = path.relative(this.srcRoot, file);
33
+ const sourceDir = path.dirname(sourceRelative);
34
+ const sourceModuleDir = getSourceModuleDir(sourceRelative);
35
+ const code = fs.readFileSync(file, 'utf8');
36
+ const imports = collectModuleStyleSourceReferences(file, code);
37
+ for (const item of imports) {
38
+ this.collectSourceImportStyle(entries, sourceDir, sourceModuleDir, item);
39
+ if (isTypeOnlySourceReference(item))
40
+ continue;
41
+ const importPath = item.importPath;
42
+ const ruleMatches = this.matchAutoImportRules(rules, importPath);
43
+ if (!ruleMatches.length)
44
+ continue;
45
+ const directSpecifiers = ruleMatches.flatMap((ruleMatch) => {
46
+ const specifier = this.createDirectStyleSpecifier(ruleMatch.rule, importPath);
47
+ return specifier ? [specifier] : [];
48
+ });
49
+ if (directSpecifiers.length) {
50
+ for (const specifier of directSpecifiers) {
51
+ const cssFile = this.resolver.resolveStyleDependency(specifier);
52
+ if (fs.existsSync(cssFile)) {
53
+ appendUniqueMapValue(entries, sourceModuleDir, specifier);
54
+ }
55
+ }
56
+ continue;
57
+ }
58
+ for (const ruleMatch of ruleMatches) {
59
+ const importedNames = getSourceReferenceImportedNames(file, item);
60
+ for (const importedName of importedNames) {
61
+ const specifier = this.createStyleSpecifier(ruleMatch.rule, ruleMatch.values, importedName);
62
+ const cssFile = this.resolver.resolveStyleDependency(specifier);
63
+ if (!fs.existsSync(cssFile)) {
64
+ continue;
65
+ }
66
+ appendUniqueMapValue(entries, sourceModuleDir, specifier);
67
+ }
68
+ }
68
69
  }
69
- }
70
- continue;
71
70
  }
72
- for (const ruleMatch of ruleMatches) {
73
- const importedNames = getSourceReferenceImportedNames(file, item);
74
- for (const importedName of importedNames) {
75
- const specifier = this.createStyleSpecifier(
76
- ruleMatch.rule,
77
- ruleMatch.values,
78
- importedName,
79
- );
80
- const cssFile = this.resolver.resolveStyleDependency(specifier);
81
- if (!fs.existsSync(cssFile)) {
82
- continue;
71
+ return entries;
72
+ }
73
+ collectSourceImportStyle(entries, sourceDir, sourceModuleDir, item) {
74
+ if (isTypeOnlySourceReference(item))
75
+ return;
76
+ const importedStyleEntry = this.resolveSourceImportStyleEntry(sourceDir, item.importPath);
77
+ if (!importedStyleEntry)
78
+ return;
79
+ const sourceStyleDir = path.join(this.srcRoot, sourceModuleDir, 'style');
80
+ appendUniqueMapValue(entries, sourceModuleDir, this.toRelativeSpecifier(sourceStyleDir, importedStyleEntry));
81
+ }
82
+ resolveSourceImportStyleEntry(sourceDir, importPath) {
83
+ const sourceRelativePaths = this.resolveSourceImportPaths(sourceDir, importPath);
84
+ for (const sourceRelativePath of sourceRelativePaths) {
85
+ const sourceBase = this.toSourceBase(sourceRelativePath);
86
+ if (!this.isInsideSourceRoot(sourceBase))
87
+ continue;
88
+ const directoryStyleEntry = path.join(sourceBase, 'style', 'index.css');
89
+ for (const extension of this.styleExtensions) {
90
+ const directorySourceStyle = path.join(sourceBase, `index${extension}`);
91
+ if (fs.existsSync(directorySourceStyle))
92
+ return directoryStyleEntry;
83
93
  }
84
- appendUniqueMapValue(entries, sourceModuleDir, specifier);
85
- }
94
+ const hasFileSourceStyle = this.styleExtensions.some((extension) => fs.existsSync(`${sourceBase}${extension}`));
95
+ if (hasFileSourceStyle)
96
+ return path.join(sourceBase, 'style', 'index.css');
86
97
  }
87
- }
98
+ return null;
88
99
  }
89
- return entries;
90
- }
91
- collectSourceImportStyle(entries, sourceDir, sourceModuleDir, item) {
92
- if (isTypeOnlySourceReference(item)) return;
93
- const importedStyleEntry = this.resolveSourceImportStyleEntry(
94
- sourceDir,
95
- item.importPath,
96
- );
97
- if (!importedStyleEntry) return;
98
- const sourceStyleDir = path.join(this.srcRoot, sourceModuleDir, 'style');
99
- appendUniqueMapValue(
100
- entries,
101
- sourceModuleDir,
102
- this.toRelativeSpecifier(sourceStyleDir, importedStyleEntry),
103
- );
104
- }
105
- resolveSourceImportStyleEntry(sourceDir, importPath) {
106
- const sourceRelativePaths = this.resolveSourceImportPaths(
107
- sourceDir,
108
- importPath,
109
- );
110
- for (const sourceRelativePath of sourceRelativePaths) {
111
- const sourceBase = this.toSourceBase(sourceRelativePath);
112
- if (!this.isInsideSourceRoot(sourceBase)) continue;
113
- const directoryStyleEntry = path.join(sourceBase, 'style', 'index.css');
114
- for (const extension of this.styleExtensions) {
115
- const directorySourceStyle = path.join(sourceBase, `index${extension}`);
116
- if (fs.existsSync(directorySourceStyle)) return directoryStyleEntry;
117
- }
118
- const hasFileSourceStyle = this.styleExtensions.some((extension) =>
119
- fs.existsSync(`${sourceBase}${extension}`),
120
- );
121
- if (hasFileSourceStyle)
122
- return path.join(sourceBase, 'style', 'index.css');
100
+ isInsideSourceRoot(file) {
101
+ const relative = path.relative(this.srcRoot, file);
102
+ return !relative.startsWith('..') && !path.isAbsolute(relative);
123
103
  }
124
- return null;
125
- }
126
- isInsideSourceRoot(file) {
127
- const relative = path.relative(this.srcRoot, file);
128
- return !relative.startsWith('..') && !path.isAbsolute(relative);
129
- }
130
- resolveSourceImportPaths(sourceDir, importPath) {
131
- return [
132
- ...resolveRelativeSourceImport(sourceDir, importPath),
133
- ...resolvePackageImportsSourceImport(
134
- this.packageRoot,
135
- this.srcRoot,
136
- importPath,
137
- ),
138
- ...resolveTsconfigPathsSourceImport(
139
- this.packageRoot,
140
- this.srcRoot,
141
- importPath,
142
- ),
143
- ];
144
- }
145
- toSourceBase(sourceRelativePath) {
146
- const sourceBase = path.join(this.srcRoot, sourceRelativePath);
147
- if (SOURCE_INDEX_RE.test(sourceBase)) {
148
- return path.dirname(sourceBase);
104
+ resolveSourceImportPaths(sourceDir, importPath) {
105
+ return [
106
+ ...resolveRelativeSourceImport(sourceDir, importPath),
107
+ ...resolvePackageImportsSourceImport(this.packageRoot, this.srcRoot, importPath),
108
+ ...resolveTsconfigPathsSourceImport(this.packageRoot, this.srcRoot, importPath),
109
+ ];
149
110
  }
150
- return sourceBase.replace(SOURCE_EXTENSION_RE, '');
151
- }
152
- toRelativeSpecifier(fromDir, file) {
153
- const relative = path.relative(fromDir, file).split(path.sep).join('/');
154
- return relative.startsWith('.') ? relative : `./${relative}`;
155
- }
156
- createAutoImportRules(config) {
157
- const rules = [];
158
- for (const [packageName, dependency] of Object.entries(
159
- config.styles.dependencies,
160
- )) {
161
- const dependencyPaths = isArray(dependency.components)
162
- ? dependency.components
163
- : dependency.components
164
- ? [dependency.components]
165
- : [];
166
- for (const dependencyPath of dependencyPaths) {
167
- rules.push({
168
- packageName,
169
- outputPattern: joinDependencySpecifier(packageName, dependencyPath),
170
- });
171
- }
111
+ toSourceBase(sourceRelativePath) {
112
+ const sourceBase = path.join(this.srcRoot, sourceRelativePath);
113
+ if (SOURCE_INDEX_RE.test(sourceBase)) {
114
+ return path.dirname(sourceBase);
115
+ }
116
+ return sourceBase.replace(SOURCE_EXTENSION_RE, '');
172
117
  }
173
- return rules;
174
- }
175
- matchAutoImportRules(rules, importPath) {
176
- const matches = [];
177
- for (const rule of rules) {
178
- if (
179
- importPath !== rule.packageName &&
180
- !importPath.startsWith(`${rule.packageName}${POSIX_SEPARATOR}`)
181
- ) {
182
- continue;
183
- }
184
- matches.push({
185
- rule,
186
- values: this.getImportPathValues(rule.packageName, importPath),
187
- });
118
+ toRelativeSpecifier(fromDir, file) {
119
+ const relative = path.relative(fromDir, file).split(path.sep).join('/');
120
+ return relative.startsWith('.') ? relative : `./${relative}`;
188
121
  }
189
- return matches;
190
- }
191
- getImportPathValues(packageName, importPath) {
192
- return importPath
193
- .slice(packageName.length)
194
- .replace(new RegExp(`^${POSIX_SEPARATOR}`), '')
195
- .split(POSIX_SEPARATOR)
196
- .filter(Boolean);
197
- }
198
- createStyleSpecifier(rule, values, importedName) {
199
- const pathValues = [...values];
200
- return rule.outputPattern.replace(/\*\*|\*/g, (token) => {
201
- const matchedValue = pathValues.shift();
202
- if (matchedValue) return matchedValue;
203
- if (token === GLOBSTAR_TOKEN) return importedName;
204
- return matchedValue ?? importedName;
205
- });
206
- }
207
- createDirectStyleSpecifier(rule, importPath) {
208
- const wildcardIndex = rule.outputPattern.indexOf('*');
209
- if (wildcardIndex < 0) {
210
- return null;
122
+ createAutoImportRules(config) {
123
+ const rules = [];
124
+ for (const [packageName, dependency] of Object.entries(config.styles.dependencies)) {
125
+ const dependencyPaths = isArray(dependency.components)
126
+ ? dependency.components
127
+ : dependency.components
128
+ ? [dependency.components]
129
+ : [];
130
+ for (const dependencyPath of dependencyPaths) {
131
+ rules.push({
132
+ packageName,
133
+ outputPattern: joinDependencySpecifier(packageName, dependencyPath),
134
+ });
135
+ }
136
+ }
137
+ return rules;
211
138
  }
212
- const wildcardLength = rule.outputPattern.startsWith(
213
- GLOBSTAR_TOKEN,
214
- wildcardIndex,
215
- )
216
- ? GLOBSTAR_TOKEN.length
217
- : 1;
218
- const prefix = rule.outputPattern.slice(0, wildcardIndex);
219
- const suffix = rule.outputPattern.slice(wildcardIndex + wildcardLength);
220
- if (!importPath.startsWith(prefix)) {
221
- return null;
139
+ matchAutoImportRules(rules, importPath) {
140
+ const matches = [];
141
+ for (const rule of rules) {
142
+ if (importPath !== rule.packageName &&
143
+ !importPath.startsWith(`${rule.packageName}${POSIX_SEPARATOR}`)) {
144
+ continue;
145
+ }
146
+ matches.push({
147
+ rule,
148
+ values: this.getImportPathValues(rule.packageName, importPath),
149
+ });
150
+ }
151
+ return matches;
152
+ }
153
+ getImportPathValues(packageName, importPath) {
154
+ return importPath
155
+ .slice(packageName.length)
156
+ .replace(new RegExp(`^${POSIX_SEPARATOR}`), '')
157
+ .split(POSIX_SEPARATOR)
158
+ .filter(Boolean);
159
+ }
160
+ createStyleSpecifier(rule, values, importedName) {
161
+ const pathValues = [...values];
162
+ return rule.outputPattern.replace(/\*\*|\*/g, (token) => {
163
+ const matchedValue = pathValues.shift();
164
+ if (matchedValue)
165
+ return matchedValue;
166
+ if (token === GLOBSTAR_TOKEN)
167
+ return importedName;
168
+ return matchedValue ?? importedName;
169
+ });
170
+ }
171
+ createDirectStyleSpecifier(rule, importPath) {
172
+ const wildcardIndex = rule.outputPattern.indexOf('*');
173
+ if (wildcardIndex < 0) {
174
+ return null;
175
+ }
176
+ const wildcardLength = rule.outputPattern.startsWith(GLOBSTAR_TOKEN, wildcardIndex)
177
+ ? GLOBSTAR_TOKEN.length
178
+ : 1;
179
+ const prefix = rule.outputPattern.slice(0, wildcardIndex);
180
+ const suffix = rule.outputPattern.slice(wildcardIndex + wildcardLength);
181
+ if (!importPath.startsWith(prefix)) {
182
+ return null;
183
+ }
184
+ return `${importPath}${suffix}`;
222
185
  }
223
- return `${importPath}${suffix}`;
224
- }
225
186
  }
@@ -1,19 +1,11 @@
1
1
  import ts from 'typescript';
2
2
  export type ModuleStyleSourceReference = {
3
- importPath: string;
4
- importClause?: ts.ImportClause;
5
- importedNames?: Array<string>;
6
- isTypeOnly?: boolean;
7
- hasNamespaceImport?: boolean;
3
+ importPath: string;
4
+ importClause?: ts.ImportClause;
5
+ importedNames?: Array<string>;
6
+ isTypeOnly?: boolean;
7
+ hasNamespaceImport?: boolean;
8
8
  };
9
- export declare function collectModuleStyleSourceReferences(
10
- file: string,
11
- code: string,
12
- ): ModuleStyleSourceReference[];
13
- export declare function isTypeOnlySourceReference(
14
- item: ModuleStyleSourceReference,
15
- ): boolean | undefined;
16
- export declare function getSourceReferenceImportedNames(
17
- file: string,
18
- item: ModuleStyleSourceReference,
19
- ): string[];
9
+ export declare function collectModuleStyleSourceReferences(file: string, code: string): ModuleStyleSourceReference[];
10
+ export declare function isTypeOnlySourceReference(item: ModuleStyleSourceReference): boolean | undefined;
11
+ export declare function getSourceReferenceImportedNames(file: string, item: ModuleStyleSourceReference): string[];