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

未关闭
#7,253 0 条评论 0 个 reaction 已指派 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 小时
30 天内合并 PR
26

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ionic-team/capacitor 的其他 Issue

查看 ionic-team/capacitor 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。