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

オープン
#7,253 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@theproducer がすでに取り組んでいます。

2024年2月15日 から。

評価

この issue はまだ評価されていません。

説明

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

主要言語
TypeScript
スター
17.1k
フォーク
1.3k
平均マージ
1日 22時間
マージ済み PR(30日)
26

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/capacitor のほかの issue

ionic-team/capacitor の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。