[Bug]: `shouldStringifyDatesInCalls` should apply to both directions

Offen
#7,253 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@theproducer arbeitet bereits daran.

Seit 15.2.2024.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

bug platform: android platform: ios
Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.7.0
@capacitor/core: 5.7.0
@capacitor/android: 5.7.0
@capacitor/ios: 5.7.0

Installed Dependencies:

@capacitor/cli: 5.4.2
@capacitor/android: 5.4.2
@capacitor/core: 5.4.2
@capacitor/ios: 5.4.2

[success] iOS looking great! 👌
[success] Android looking great! 👌

Other API Details

No response

Platforms Affected
  • iOS
  • Android
  • Web
Current Behavior

The Capacitor Firebase Firestore plugin must be able to distinguish between strings and date objects both incoming and outgoing.
I use shouldStringifyDatesInCalls to prevent JS date objects from being converted to strings. Unfortunately, this only works incoming, not outgoing.

Expected Behavior

If I return a Date object on Android (see https://github.com/ionic-team/capacitor/issues/7252) or iOS and the shouldStringifyDatesInCalls is set to false, then I expect a JS date object at JS level.

Project Reproduction

https://github.com/robingenz/capacitor-firebase-plugin-demo

Additional Information

See https://github.com/robingenz/capacitor-firebase-plugin-demo/blob/676a3ea77190011b1951f7e9e983156467cf9a77/src/app/modules/firebase-firestore/firebase-firestore.page.ts

Vorherrschende Sprache
TypeScript
Sterne
17.1k
Forks
1.3k
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
26

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ionic-team/capacitor

Alle Issues in ionic-team/capacitor

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.