Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • pubsweet pubsweet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pubsweetpubsweet
  • pubsweetpubsweet
  • Merge requests
  • !638

feat(server): add support for TypeScript

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Jure requested to merge typescript into master Feb 11, 2020
  • Overview 2
  • Commits 7
  • Pipelines 4
  • Changes 27

Per our discussion and decision at the January PubSweet meeting to add types to PubSweet to share interfaces and by doing that, improve reusability (see also https://gitlab.coko.foundation/pubsweet/types), this adds support for TypeScript to pubsweet-server.

There are no new types here, other than the automatically inferred ones. New typings will be added in separate MRs.

Nothing changes for consumers of pubsweet-server, so this is not a breaking change.

As I'm only starting to work with TypeScript, I'd love for TS experts to comment on this setup. Specifically, there are some challenges with a cross-platform monorepo, that you've probably encountered! (e.g. pubsweet-server's tsc also checks types for e.g. @types/testing-library__dom, which of course fails in a DOM-less environment, unless you specifically opt out/opt in 🤷)

@diversemix, @andrei.cioromila and others - thoughts welcome!

To-do:

  • Add a single TS file and make sure tests with Jest still run using TypeScript
Edited Feb 13, 2020 by Jure
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: typescript