fix: add strict types to build scripts and remove all any usage

Replace all implicit and explicit any types in build scripts with
proper TypeScript Compiler API types (Decorator, ClassDeclaration,
MethodDeclaration, Identifier, SourceFile, etc.). Add PackageJson
and InjectableClassEntry interfaces. Fix return types, null checks,
and type assertions throughout all transformer scripts.
This commit is contained in:
Daniel Sogl
2026-03-21 16:11:27 -07:00
parent 6453f2ab78
commit 62956e429c
9 changed files with 160 additions and 108 deletions
@@ -23,7 +23,7 @@ export const EMIT_PATH = resolve(ROOT, 'injectable-classes.json');
*/
export function extractInjectables() {
return (ctx: TransformationContext) => {
return (tsSourceFile) => {
return (tsSourceFile: any) => {
if (tsSourceFile.fileName.indexOf('src/@awesome-cordova-plugins/plugins') > -1) {
visitEachChild(
tsSourceFile,
@@ -36,7 +36,7 @@ export function extractInjectables() {
if (isInjectable) {
injectableClasses.push({
file: tsSourceFile.path,
className: (node as ClassDeclaration).name.text,
className: (node as ClassDeclaration).name!.text,
dirName: tsSourceFile.path.split(/[\\\/]+/).reverse()[1],
});
}