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 🙏

© 2025 – Pkg Stats / Ryan Hefner

maestroqa-types-meteor

v0.0.1

Published

forked version of @types/meteor for maestroqa's use

Readme

Meteor Type Definitions

Description

These are the definitions for version 1.4 of Meteor. These definitions were generated from the same Meteor data.js file that is used to generate the official Meteor docs. The code that generates these definitions can be found here.

Upcoming Meteor typescript package

There is currently an effort supported by the Meteor Development Group to create a TypeScript build compiler package, and an early version of the package can be tested using barbatus:typescript.

From within any Meteor application that is version 1.2.1 or later, install this package in the standard manner:

$ meteor add barbatus:typescript

This package will eventually incorporated as a Meteor core package (e.g. like the coffeescript package). It appears that the eventual recommended practice for adding definitions using that package will be to add them using the typings tool.

You can follow discussion about this effort here.

TypeScript/Meteor coding style

References

Meteor code can run on the client and the server, for this reason you should try to stay away from referencing file.ts directly: you may get unexpected results.

Rather generate a file.d.ts using tsc --declaration file.ts, and reference it in your file.

Compilation will be much faster and code will be cleaner - it's always better to split definition from implementation anyways.

Templates

With the exception of the body and head templates, Meteor's Template dot notation cannot be used (ie. Template.mytemplate). Thanks to Typescript static typing checks, you will need to use the bracket notation to access the Template.

Template['myTemplateName'].helpers({
  foo: function () {
    return Session.get("foo");
  }
});

Template['myTemplateName'].onRendered(function ( ) { ... });

The same is true for Meteor.settings:

Meteor.settings.public['<some config>']

Form fields

Form fields typically need to be cast to <HTMLInputElement>. For instance to read a form field value, use (<HTMLInputElement>evt.target).value.

Global variables

Preface any global variable declarations with a TypeScript declare var statement (or place the statement in a definition file):

declare var NavbarHelpers;
NavbarHelpers = {};
NavbarHelpers.someMethod = function() {...}

Collections

The majority of extra work required to use TypeScript with Meteor is creating and maintaining the collection interfaces. However, doing so also provides the additional benefit of succinctly documenting collection schema definitions (that are actually enforced).

To define collections, you will need to create an interface representing the collection and then declare a Collection type variable with that interface type (as a generic):

interface JobDAO {
  _id?: string;
  name: string;
  status?: string;
  queuedAt?: string;
}

declare var Jobs: Mongo.Collection<JobDAO>;
Jobs = new Mongo.Collection<JobDAO>('jobs');

Finally, any TypeScript file using collections will need to contain a reference at the top pointing to the collection definitions:

/// <reference path=".typescript/package_defs/meteor.d.ts"/>
/// <reference path=".typescript/custom_defs/collections.ts"/>