npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mateuszrozanski/worldcup-types

v0.5.0

Published

TypeScript types for the World Cup 2026 backend ↔ frontend contract.

Readme

@mateuszrozanski/worldcup-types

TypeScript types for the World Cup 2026 backend ↔ frontend contract. Single source of truth — these types live in the backend repo and are consumed by the frontend via npm.

Note: package temporarily under personal npm scope. Will migrate to @synergycodes/worldcup-types when the org is set up on npm. See ADR-046 in docs/decisions.md.

Install

npm install @mateuszrozanski/worldcup-types

Standard npm package — semver works, dependabot works, npm cache works.

Use

import {
  TournamentState,
  GroupMatch,
  KnockoutMatch,
  MatchEvent,
  AblyEvent,
  AblyEventType,
  WORLDCUP_CHANNEL,
} from '@mateuszrozanski/worldcup-types';

// /api/state response
async function loadBracket(): Promise<TournamentState> {
  const res = await fetch('https://worldcup-backend-staging.up.railway.app/api/state');
  return res.json() as Promise<TournamentState>;
}

// Ably channel name (no magic strings)
const channel = realtime.channels.get(WORLDCUP_CHANNEL);

channel.subscribe((msg) => {
  // msg.name is one of AblyEvent['type']
  // msg.data shape depends on msg.name
  const event = { type: msg.name, data: msg.data } as AblyEvent;
  switch (event.type) {
    case 'score:update': /* ... */ break;
    case 'match:goal':   /* ... */ break;
    // ...
  }
});

Exports

| Group | Symbols | |---|---| | Domain types | TournamentState, Team, Group, GroupMatch, KnockoutMatch, KnockoutRound, QualificationSlot, TeamStanding, MatchEvent, MatchStats, Lineup, Squad, Player, Injury, HeadToHead, HistoricalMatch, MatchStatus, TournamentStatus, Confederation, PlayerPosition, GroupId, TeamId, MatchId, PlayerId | | Ably | WORLDCUP_CHANNEL, AblyEvent (union), AblyEventType | | Helpers | headToHeadKey(a, b) — canonical pair-key ordering for h2h lookup |

Versioning

Standard semver. We're pre-1.0 so:

  • patch (0.1.0 → 0.1.1) — additive, backward-compatible
  • minor (0.1.0 → 0.2.0) — breaking changes during MVP
  • major (0.x → 1.0) — first stable contract

Pin in your package.json:

{
  "dependencies": {
    "@mateuszrozanski/worldcup-types": "^0.1.1"
  }
}

Development (in this repo)

cd types
npm install
npm run build   # emits dist/index.d.ts + index.js

Source files are copies of src/schemas/index.ts and src/ably/ably.events.ts from the parent backend. They MUST stay in sync — the contract test in src/sports-api/contract.spec.ts validates the runtime shape against these types.

Release flow

  1. Bump version in types/package.json
  2. Commit + tag: git tag types-vX.Y.Z && git push --tags
  3. GitHub Actions auto-publishes to npm (workflow: .github/workflows/publish-types.yml)
  4. Frontend bumps pin in their package.json + npm install

The CI workflow validates the tag matches the package.json version and uses the NPM_TOKEN secret to publish.

Links