mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-03-25 00:00:14 +08:00
fix: resolve remaining type errors in build scripts
Fix __String vs string type mismatch in imports transformer by converting escapedText to string. Add @ts-expect-error for TypeDoc Converter.on() which exists at runtime but is not in public type exports.
This commit is contained in:
@@ -46,7 +46,7 @@ function transformImports(file: SourceFile, _ctx: TransformationContext, ngcBuil
|
||||
decorators.forEach((d) => (methods = getMethodsForDecorator(d).concat(methods)));
|
||||
|
||||
const methodElements = methods.map((name: string) => factory.createIdentifier(name));
|
||||
const methodNames = methodElements.map((el: Identifier) => el.escapedText);
|
||||
const methodNames = methodElements.map((el: Identifier) => String(el.escapedText));
|
||||
|
||||
importStatement.importClause.namedBindings.elements = [
|
||||
factory.createIdentifier('AwesomeCordovaNativePlugin'),
|
||||
|
||||
@@ -197,6 +197,7 @@ async function main(): Promise<void> {
|
||||
} as unknown as Parameters<typeof Application.bootstrapWithPlugins>[0]);
|
||||
|
||||
// Extract @Plugin() decorator metadata during TypeScript conversion
|
||||
// @ts-expect-error — Converter extends EventDispatcher but 'on' is not in public type exports
|
||||
app.converter.on(
|
||||
Converter.EVENT_CREATE_DECLARATION,
|
||||
(context: Context, reflection: DeclarationReflection) => {
|
||||
|
||||
Reference in New Issue
Block a user