expo-type-information 0.0.0 → 0.0.2
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.
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/bin/cli.js +2 -0
- package/build/cli.d.ts +1 -0
- package/build/cli.js +35 -0
- package/build/cli.js.map +1 -0
- package/build/commands/commandUtils.d.ts +46 -0
- package/build/commands/commandUtils.js +274 -0
- package/build/commands/commandUtils.js.map +1 -0
- package/build/commands/generateJSXIntrinsicsCommand.d.ts +2 -0
- package/build/commands/generateJSXIntrinsicsCommand.js +28 -0
- package/build/commands/generateJSXIntrinsicsCommand.js.map +1 -0
- package/build/commands/generateMocksForFileCommand.d.ts +2 -0
- package/build/commands/generateMocksForFileCommand.js +22 -0
- package/build/commands/generateMocksForFileCommand.js.map +1 -0
- package/build/commands/generateModuleTypesCommand.d.ts +2 -0
- package/build/commands/generateModuleTypesCommand.js +32 -0
- package/build/commands/generateModuleTypesCommand.js.map +1 -0
- package/build/commands/generateViewTypesCommand.d.ts +2 -0
- package/build/commands/generateViewTypesCommand.js +28 -0
- package/build/commands/generateViewTypesCommand.js.map +1 -0
- package/build/commands/inlineModulesInterfaceCommand.d.ts +2 -0
- package/build/commands/inlineModulesInterfaceCommand.js +129 -0
- package/build/commands/inlineModulesInterfaceCommand.js.map +1 -0
- package/build/commands/moduleInterfaceCommand.d.ts +2 -0
- package/build/commands/moduleInterfaceCommand.js +46 -0
- package/build/commands/moduleInterfaceCommand.js.map +1 -0
- package/build/commands/shortModuleInterfaceCommand.d.ts +2 -0
- package/build/commands/shortModuleInterfaceCommand.js +17 -0
- package/build/commands/shortModuleInterfaceCommand.js.map +1 -0
- package/build/commands/typeInformationCommand.d.ts +2 -0
- package/build/commands/typeInformationCommand.js +24 -0
- package/build/commands/typeInformationCommand.js.map +1 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +28 -0
- package/build/index.js.map +1 -0
- package/build/mockgen.d.ts +4 -0
- package/build/mockgen.js +204 -0
- package/build/mockgen.js.map +1 -0
- package/build/swift/sourcekittenTypeInformation.d.ts +6 -0
- package/build/swift/sourcekittenTypeInformation.js +875 -0
- package/build/swift/sourcekittenTypeInformation.js.map +1 -0
- package/build/typeInformation.d.ts +209 -0
- package/build/typeInformation.js +157 -0
- package/build/typeInformation.js.map +1 -0
- package/build/types.d.ts +59 -0
- package/build/types.js +3 -0
- package/build/types.js.map +1 -0
- package/build/typescriptGeneration.d.ts +61 -0
- package/build/typescriptGeneration.js +696 -0
- package/build/typescriptGeneration.js.map +1 -0
- package/build/utils.d.ts +6 -0
- package/build/utils.js +44 -0
- package/build/utils.js.map +1 -0
- package/jest.config.js +6 -0
- package/package.json +46 -5
- package/src/cli.ts +38 -0
- package/src/commands/commandUtils.ts +352 -0
- package/src/commands/generateJSXIntrinsicsCommand.ts +38 -0
- package/src/commands/generateMocksForFileCommand.ts +30 -0
- package/src/commands/generateModuleTypesCommand.ts +39 -0
- package/src/commands/generateViewTypesCommand.ts +39 -0
- package/src/commands/inlineModulesInterfaceCommand.ts +175 -0
- package/src/commands/moduleInterfaceCommand.ts +56 -0
- package/src/commands/shortModuleInterfaceCommand.ts +26 -0
- package/src/commands/typeInformationCommand.ts +35 -0
- package/src/index.ts +9 -0
- package/src/mockgen.ts +338 -0
- package/src/swift/sourcekittenTypeInformation.ts +1173 -0
- package/src/typeInformation.ts +326 -0
- package/src/types.ts +68 -0
- package/src/typescriptGeneration.ts +1179 -0
- package/src/utils.ts +44 -0
- package/tests/TestModule.swift +175 -0
- package/tests/__snapshots__/typeInformation.test.ts.snap +1578 -0
- package/tests/typeInformation.test.ts +134 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import commander from 'commander';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
addCommonOptions,
|
|
6
|
+
getFileTypeInformationFromArgs,
|
|
7
|
+
parseCommandArguments,
|
|
8
|
+
runCommandOnWatch,
|
|
9
|
+
TypeInformationCommandCommonAllArguments,
|
|
10
|
+
writeStringToFileOrPrintToConsole,
|
|
11
|
+
} from './commandUtils';
|
|
12
|
+
import { generateModuleTypesFileContent } from '../typescriptGeneration';
|
|
13
|
+
|
|
14
|
+
export function generateModuleTypesCommand(cli: commander.Command) {
|
|
15
|
+
return addCommonOptions(cli.command('generate-module-types')).action(
|
|
16
|
+
async (options: TypeInformationCommandCommonAllArguments) => {
|
|
17
|
+
const parsedArgs = await parseCommandArguments(options);
|
|
18
|
+
if (!parsedArgs) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const { realOutputPath } = parsedArgs;
|
|
22
|
+
|
|
23
|
+
const command = async () => {
|
|
24
|
+
const typeInfo = await getFileTypeInformationFromArgs(parsedArgs);
|
|
25
|
+
if (!typeInfo) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const moduleTypesFileContent = await generateModuleTypesFileContent(typeInfo);
|
|
30
|
+
if (!moduleTypesFileContent) {
|
|
31
|
+
console.error(chalk.red(`Couldn't generate module types file content!`));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
writeStringToFileOrPrintToConsole(moduleTypesFileContent, realOutputPath);
|
|
35
|
+
};
|
|
36
|
+
runCommandOnWatch(parsedArgs, command);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import commander from 'commander';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
addCommonOptions,
|
|
5
|
+
getFileTypeInformationFromArgs,
|
|
6
|
+
parseCommandArguments,
|
|
7
|
+
runCommandOnWatch,
|
|
8
|
+
TypeInformationCommandCommonAllArguments,
|
|
9
|
+
writeStringToFileOrPrintToConsole,
|
|
10
|
+
} from './commandUtils';
|
|
11
|
+
import { generateViewTypesFileContent } from '../typescriptGeneration';
|
|
12
|
+
|
|
13
|
+
export function generateViewTypesCommand(cli: commander.Command) {
|
|
14
|
+
return addCommonOptions(cli.command('generate-view-types')).action(
|
|
15
|
+
async (options: TypeInformationCommandCommonAllArguments) => {
|
|
16
|
+
const parsedArgs = await parseCommandArguments(options);
|
|
17
|
+
if (!parsedArgs) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const { realOutputPath } = parsedArgs;
|
|
21
|
+
|
|
22
|
+
const command = async () => {
|
|
23
|
+
const typeInfo = await getFileTypeInformationFromArgs(parsedArgs);
|
|
24
|
+
if (!typeInfo) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const viewTypesFileContent = await generateViewTypesFileContent(typeInfo);
|
|
29
|
+
if (!viewTypesFileContent) {
|
|
30
|
+
console.error("Couldn't generate view types!");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
writeStringToFileOrPrintToConsole(viewTypesFileContent, realOutputPath);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
runCommandOnWatch(parsedArgs, command);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import commander from 'commander';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
debounce,
|
|
7
|
+
generateConciseTsFiles,
|
|
8
|
+
parseCommandArguments,
|
|
9
|
+
TypeInformationCommandCommonAllArguments,
|
|
10
|
+
} from './commandUtils';
|
|
11
|
+
import { TypeInferenceOption } from '../typeInformation';
|
|
12
|
+
import { scanFilesRecursively, taskAll } from '../utils';
|
|
13
|
+
|
|
14
|
+
async function getResolvedWatchedDirectoriesFromAppJson(
|
|
15
|
+
appJsonPath: string
|
|
16
|
+
): Promise<string[] | null> {
|
|
17
|
+
try {
|
|
18
|
+
const appJson = JSON.parse(await fs.promises.readFile(appJsonPath, 'utf-8'));
|
|
19
|
+
const watchedDirectories = appJson?.expo?.experiments?.inlineModules?.watchedDirectories;
|
|
20
|
+
|
|
21
|
+
if (!Array.isArray(watchedDirectories)) {
|
|
22
|
+
console.error(`watchedDirectories are not defined!`);
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const rootDir = path.dirname(path.resolve(appJsonPath));
|
|
27
|
+
return watchedDirectories.map((relativePath) => path.resolve(rootDir, relativePath));
|
|
28
|
+
} catch (e) {
|
|
29
|
+
console.error(`Couldn't read ${appJsonPath}.`, e);
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type GenerateInlineModulesTSFilesOptions = {
|
|
35
|
+
filePath: string;
|
|
36
|
+
dirPath: string;
|
|
37
|
+
typeInference: TypeInferenceOption;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
async function generateInlineModuleTSFiles({
|
|
41
|
+
filePath,
|
|
42
|
+
dirPath,
|
|
43
|
+
typeInference,
|
|
44
|
+
}: GenerateInlineModulesTSFilesOptions) {
|
|
45
|
+
return await generateConciseTsFiles({
|
|
46
|
+
realInputPaths: [filePath],
|
|
47
|
+
realOutputPath: dirPath,
|
|
48
|
+
typeInference,
|
|
49
|
+
watcher: false,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type InlineModulesWatcherOptions = {
|
|
54
|
+
appJsonPath: string;
|
|
55
|
+
typeInference: TypeInferenceOption;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
async function inlineModulesWatcher({ appJsonPath, typeInference }: InlineModulesWatcherOptions) {
|
|
59
|
+
const debouncedInlineModulesTsGeneration = debounce(generateInlineModuleTSFiles);
|
|
60
|
+
const watchedDirectoriesWatchers: Map<string, fs.FSWatcher> = new Map<string, fs.FSWatcher>();
|
|
61
|
+
|
|
62
|
+
const setupWatchedDirectoriesWatchers = async () => {
|
|
63
|
+
const watchedDirectories = await getResolvedWatchedDirectoriesFromAppJson(appJsonPath);
|
|
64
|
+
|
|
65
|
+
// Merge new watchers with old watchers.
|
|
66
|
+
// Let's first find and remove the obsolete ones.
|
|
67
|
+
const watchedDirsSet = new Set(watchedDirectories ?? []);
|
|
68
|
+
const obsoleteWatchersKeys = [];
|
|
69
|
+
for (const [key] of watchedDirectoriesWatchers) {
|
|
70
|
+
if (!watchedDirsSet.has(key)) {
|
|
71
|
+
obsoleteWatchersKeys.push(key);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
for (const key of obsoleteWatchersKeys) {
|
|
76
|
+
const watcher = watchedDirectoriesWatchers.get(key);
|
|
77
|
+
watcher?.close();
|
|
78
|
+
watchedDirectoriesWatchers.delete(key);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Now let's create and add new watchers
|
|
82
|
+
const createWatcherForDir = (dir: string) => {
|
|
83
|
+
return fs.watch(dir, { recursive: true, encoding: 'utf-8' }, async (event, fileName) => {
|
|
84
|
+
if (!fileName) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const resolvedFilePath = path.resolve(dir, fileName);
|
|
89
|
+
if (fs.existsSync(resolvedFilePath)) {
|
|
90
|
+
debouncedInlineModulesTsGeneration({
|
|
91
|
+
filePath: resolvedFilePath,
|
|
92
|
+
dirPath: path.dirname(resolvedFilePath),
|
|
93
|
+
typeInference,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
for (const dir of watchedDirectories ?? []) {
|
|
100
|
+
const watcher = watchedDirectoriesWatchers.get(dir);
|
|
101
|
+
if (!watcher) {
|
|
102
|
+
watchedDirectoriesWatchers.set(dir, createWatcherForDir(dir));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
await setupWatchedDirectoriesWatchers();
|
|
107
|
+
|
|
108
|
+
const appJsonWatcher = fs.watch(appJsonPath, 'utf-8', async (event) => {
|
|
109
|
+
if (event === 'rename' && !fs.existsSync(appJsonPath)) {
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
111
|
+
for (const [_, watcher] of watchedDirectoriesWatchers) {
|
|
112
|
+
watcher.close();
|
|
113
|
+
}
|
|
114
|
+
appJsonWatcher.close();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
await setupWatchedDirectoriesWatchers();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export async function inlineModulesInterfaceCommand(cli: commander.Command) {
|
|
123
|
+
return cli
|
|
124
|
+
.command('inline-modules-interface')
|
|
125
|
+
.summary('Creates ts interface for every Swift inline module in the project.')
|
|
126
|
+
.description(
|
|
127
|
+
'Creates ts interface for every Swift inline module in the project. The ts interface consists of two files Module.generated.ts and Module.tsx, the first one is regenerated with each run of the command and the second one will not be regenerated if user changes it.'
|
|
128
|
+
)
|
|
129
|
+
.requiredOption(
|
|
130
|
+
'-a --app-json <appJsonPathPath>',
|
|
131
|
+
'A path to the `app.json` where the inline.modules.watchedDirectories are defined.'
|
|
132
|
+
)
|
|
133
|
+
.option('-w --watcher', 'Starts a watcher that checks for changes in inline modules files.')
|
|
134
|
+
.action(async (options: TypeInformationCommandCommonAllArguments) => {
|
|
135
|
+
const parsedArgs = parseCommandArguments(options);
|
|
136
|
+
if (!parsedArgs) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const { appJsonPath, watcher } = parsedArgs;
|
|
141
|
+
if (!appJsonPath) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const watchedDirectories = await getResolvedWatchedDirectoriesFromAppJson(appJsonPath);
|
|
146
|
+
if (!watchedDirectories) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const dirents = [];
|
|
151
|
+
for (const dir of watchedDirectories) {
|
|
152
|
+
for await (const dirent of scanFilesRecursively(dir)) {
|
|
153
|
+
if (!dirent.name.endsWith('.swift')) {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
dirents.push(dirent);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
await taskAll(
|
|
162
|
+
dirents,
|
|
163
|
+
async (dirent) =>
|
|
164
|
+
await generateInlineModuleTSFiles({
|
|
165
|
+
filePath: dirent.path,
|
|
166
|
+
dirPath: dirent.parentPath,
|
|
167
|
+
typeInference: parsedArgs.typeInference,
|
|
168
|
+
})
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
if (watcher) {
|
|
172
|
+
await inlineModulesWatcher({ appJsonPath, typeInference: parsedArgs.typeInference });
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import commander from 'commander';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
addCommonOptions,
|
|
6
|
+
getFileTypeInformationFromArgs,
|
|
7
|
+
parseCommandArguments,
|
|
8
|
+
runCommandOnWatch,
|
|
9
|
+
TypeInformationCommandCommonAllArguments,
|
|
10
|
+
writeToStableFile,
|
|
11
|
+
} from './commandUtils';
|
|
12
|
+
import { generateFullTsInterface } from '../typescriptGeneration';
|
|
13
|
+
|
|
14
|
+
export function moduleInterfaceCommand(cli: commander.Command) {
|
|
15
|
+
return addCommonOptions(cli.command('module-interface'))
|
|
16
|
+
.summary('Generates a full ts interface for a Swift module.')
|
|
17
|
+
.description(
|
|
18
|
+
'Generates a full ts interface for a Swift module. It consists of types.ts file with all types defined in the module, module.ts with the native module definition, and view.tsx for each view defined in the module, and an index.ts file which reexports some functions.'
|
|
19
|
+
)
|
|
20
|
+
.action(async (options: TypeInformationCommandCommonAllArguments) => {
|
|
21
|
+
const parsedArgs = await parseCommandArguments(options, false);
|
|
22
|
+
if (!parsedArgs) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const { realInputPaths, realOutputPath } = parsedArgs;
|
|
26
|
+
|
|
27
|
+
const command = async () => {
|
|
28
|
+
const typeInfo = await getFileTypeInformationFromArgs(parsedArgs);
|
|
29
|
+
if (!typeInfo) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const generatedFiles = await generateFullTsInterface(typeInfo);
|
|
33
|
+
if (!generatedFiles) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const { moduleTypesFile, moduleViewsFiles, moduleNativeFile, indexFile } = generatedFiles;
|
|
37
|
+
|
|
38
|
+
const dirName = realOutputPath ?? path.dirname(realInputPaths[0] as string);
|
|
39
|
+
const writeFilePromises = [];
|
|
40
|
+
for (const outputFile of [
|
|
41
|
+
moduleTypesFile,
|
|
42
|
+
...moduleViewsFiles,
|
|
43
|
+
moduleNativeFile,
|
|
44
|
+
indexFile,
|
|
45
|
+
]) {
|
|
46
|
+
const outputFilePath = path.resolve(dirName, outputFile.name);
|
|
47
|
+
writeFilePromises.push(
|
|
48
|
+
writeToStableFile({ filePath: outputFilePath, content: outputFile.content })
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
await Promise.all(writeFilePromises);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
runCommandOnWatch(parsedArgs, command);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import commander from 'commander';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
addCommonOptions,
|
|
5
|
+
generateConciseTsFiles,
|
|
6
|
+
parseCommandArguments,
|
|
7
|
+
runCommandOnWatch,
|
|
8
|
+
TypeInformationCommandCommonAllArguments,
|
|
9
|
+
} from './commandUtils';
|
|
10
|
+
|
|
11
|
+
export function shortModuleInterfaceCommand(cli: commander.Command) {
|
|
12
|
+
addCommonOptions(
|
|
13
|
+
cli
|
|
14
|
+
.command('short-module-interface')
|
|
15
|
+
.summary('Creates a short ts interface, great with inline-modules.')
|
|
16
|
+
.description(
|
|
17
|
+
'Creates a short ts interface for an expo module. Overrites `ModuleName.generated.ts` and creates `ModuleName.ts` if not present. Can be used with inline-modules.'
|
|
18
|
+
)
|
|
19
|
+
).action(async (options: TypeInformationCommandCommonAllArguments) => {
|
|
20
|
+
const parsedArgs = await parseCommandArguments(options, false);
|
|
21
|
+
if (!parsedArgs) return;
|
|
22
|
+
|
|
23
|
+
const command = () => generateConciseTsFiles(parsedArgs);
|
|
24
|
+
runCommandOnWatch(parsedArgs, command);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import commander from 'commander';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
addCommonOptions,
|
|
5
|
+
getFileTypeInformationFromArgs,
|
|
6
|
+
parseCommandArguments,
|
|
7
|
+
runCommandOnWatch,
|
|
8
|
+
TypeInformationCommandCommonAllArguments,
|
|
9
|
+
writeStringToFileOrPrintToConsole,
|
|
10
|
+
} from './commandUtils';
|
|
11
|
+
import { serializeTypeInformation } from '../typeInformation';
|
|
12
|
+
|
|
13
|
+
export function typeInformationCommand(cli: commander.Command) {
|
|
14
|
+
return addCommonOptions(cli.command('type-information')).action(
|
|
15
|
+
async (options: TypeInformationCommandCommonAllArguments) => {
|
|
16
|
+
const parsedArgs = await parseCommandArguments(options);
|
|
17
|
+
if (!parsedArgs) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const command = async () => {
|
|
22
|
+
const typeInfo = await getFileTypeInformationFromArgs(parsedArgs);
|
|
23
|
+
if (!typeInfo) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const typeInfoSerialized = serializeTypeInformation(typeInfo);
|
|
28
|
+
const typeInfoSerializedString = JSON.stringify(typeInfoSerialized, null, 2);
|
|
29
|
+
writeStringToFileOrPrintToConsole(typeInfoSerializedString, parsedArgs.realOutputPath);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
runCommandOnWatch(parsedArgs, command);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './typeInformation';
|
|
2
|
+
export { generateMocks, getAllExpoModulesInWorkingDirectory } from './mockgen';
|
|
3
|
+
export {
|
|
4
|
+
generateConciseTsInterface,
|
|
5
|
+
generateFullTsInterface,
|
|
6
|
+
generateModuleTypesFileContent,
|
|
7
|
+
generateViewTypesFileContent,
|
|
8
|
+
generateJSXIntrinsicsFileContent,
|
|
9
|
+
} from './typescriptGeneration';
|