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

Aperta
#7,253 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@theproducer ci sta già lavorando.

Dal 15/2/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
TypeScript
Stelle
17.1k
Fork
1.3k
Merge medio
1g 22h
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ionic-team/capacitor

Tutte le issue di ionic-team/capacitor

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.