Skip to content

Feature/ts data types - #12941

Closed
carlosingles wants to merge 6 commits into
sequelize:v6-betafrom
carlosingles:feature/ts-data-types
Closed

carlosingles wants to merge 6 commits into
sequelize:v6-betafrom
carlosingles:feature/ts-data-types

Conversation

@carlosingles

Copy link
Copy Markdown

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Hello 👋

I thought I would try to help with the typescript migration that is being performed for v7. I hope this will prove useful, I only did one file since I was unsure if my changes would be accepted or not. Please let me know if this work is something that you would like to see more of and I will continue to try and help with the migration.

I have a few questions regarding my PR. I currently do not have a full understanding of the data-types column definitions, so I did some guess work and in places where I was unsure I used unknown instead of any.

  • I cannot find a reference of the static parse method being used, would anyone have any ideas on what this function is used for?
  • The _sanitize function seems to take the primitive value and attempt to make it adhere to the column data type. However, in cases where it does not pass, it returns the raw value instead. Is it okay for this function to remain typed as unknown and in cases where we need to use it, we can define the correct types? (see line 439's BOOLEAN.prototype._sanitize method)
  • I have made individual interfaces for the constructor options inline, is there a preferred method of where these types of interfaces should be placed?

Please do not hesitate to reach out to me, I am happy to hear any feedback that you may have :)

@codecov

codecov Bot commented Jan 5, 2021 •

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (v6-beta@e61e2cd). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 7806bc7 differs from pull request most recent head 13bc13b. Consider uploading reports for the commit 13bc13b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             v6-beta   #12941   +/-   ##
==========================================
  Coverage           ?   96.24%           
==========================================
  Files              ?       95           
  Lines              ?     9267           
  Branches           ?      176           
==========================================
  Hits               ?     8919           
  Misses             ?      323           
  Partials           ?       25           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e61e2cd...13bc13b. Read the comment docs.

@sdepold

sdepold commented Oct 24, 2021

Copy link
Copy Markdown
Member

Hey there :)

First of all: Thanks a bunch for your contribution to Sequelize! Much appreciated!
Second: Unfortunately we haven't had the chance to look into this ever since you created it. Sorry for that!

A couple of months ago, we have switched from master to main branch as our primary development branch and hence this PR is now outdated :(

If you still think this change is making sense, please consider recreating the PR against main. Thanks in advance and sorry for the additional work.

✌️

@carlosingles

Copy link
Copy Markdown
Author

No problems, is sequelize still planning on migrating to typescript?

My PR has to do with the typescript migration that was suggested a while ago. If this is not the case and the typescript migration has been cancelled, then I can close this PR as the current main branch has no indication that it is, or will be using typescript.

@github-actions github-actions Bot added the stale label Nov 4, 2021
@WikiRik WikiRik removed the stale label Nov 15, 2021
@github-actions github-actions Bot added the stale label Nov 30, 2021
@WikiRik

WikiRik commented Dec 13, 2021

Copy link
Copy Markdown
Member

@carlosingles sorry for the late response, but we are currently working on the migration to TypeScript as a next release of v6. So feel free to continue working on this but make sure that all changes are backwards compatible.

@github-actions github-actions Bot removed the stale label Dec 14, 2021
@carlosingles
carlosingles changed the base branch from master to v6-beta December 14, 2021 04:05
@github-actions github-actions Bot added the stale label Jan 4, 2022
@ephys ephys mentioned this pull request May 13, 2022
38 of 42 tasks
@ephys ephys closed this in #14505 Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants