Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the cooler Date types PR #85

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

peter-lyons-kehl
Copy link
Contributor

@CerulanLumina This is your support-date-types rebased on main, with minor TypeScript and Kotlin extras. Use as you like.

@peter-lyons-kehl
Copy link
Contributor Author

Not ready for merge, but I'm putting this out Draft, so you get CI run the tests.

@peter-lyons-kehl peter-lyons-kehl marked this pull request as ready for review March 24, 2023 06:46
@LuminaSapphira
Copy link
Collaborator

Hey, thanks for this! I had gotten sidetracked on other projects so I haven't looked at this branch in a while.

@LuminaSapphira LuminaSapphira mentioned this pull request Mar 30, 2023
2 tasks
@LuminaSapphira LuminaSapphira force-pushed the support-date-types-pk branch 2 times, most recently from 0c1edc4 to ddc28c5 Compare April 10, 2023 17:57
@LuminaSapphira LuminaSapphira changed the title Date types (rebased on main; 82 tests failing) the cooler Date types PR Apr 10, 2023
@@ -84,6 +92,15 @@ impl Language for TypeScript {
Ok(())
}

fn end_file(&mut self, w: &mut dyn Write) -> std::io::Result<()> {
if self.has_date.load(Ordering::SeqCst) {
writeln!(w, "export function TypeshareDateReviver(key, value): Date {{ return new Date(value); }}")?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose for this function? Why does it need to take key?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a provided function that can be passed to JSON.parse to revive JSON into an actual Date type rather than just an object. The function signature is necessary as it is what JSON.parse expects

core/src/language/typescript.rs Outdated Show resolved Hide resolved
@LuminaSapphira LuminaSapphira marked this pull request as draft April 18, 2023 19:24
@Exotik850
Copy link

Is there any work left to be done for this? Would be quite useful for many applications

@rt-planck
Copy link

Awesome that there is an ongoing fix.
What is missing here? How can we help to accelerate merging this bugfix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants