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

@anygridtech/frappe-types

v2.1.1

Published

TypeScript type definitions for Frappe

Downloads

43

Readme

Status License



📝 Table of Contents


🧐 About

The Frappe Framework offers a powerful client-side API — but it’s built around plain JavaScript, which comes with common issues:

  • ❌ Typing mistakes (e.g. frm.doc.customer_name vs frm.doc.customer_nam)
  • ❌ No clarity on the shape of API responses
  • ❌ Fragile code during refactors
  • ❌ Poor autocomplete and inline documentation

With @anygridtech/frappe-types, you get:

  • ✅ Accurate autocompletion
  • ✅ Compile-time error checking
  • ✅ Inline documentation support
  • ✅ Improved code maintainability and developer experience

📦 What’s Included?

Type definitions for commonly used global objects:

  • frappe: frappe.call, frappe.db, frappe.ui.form, frappe.msgprint, etc.
  • cur_frm: The current form object (cur_frm.doc, cur_frm.set_value, etc.)
  • __: Translation function
  • Utilities: msgprint, cstr, flt, etc.

🧩 The list is continuously expanding as new globals and patterns are added.


🏁 Getting Started

These instructions will help you set up the package in a TypeScript project.

Prerequisites

Make sure your project is configured for TypeScript:

npm install typescript
npx tsc --init

📥 Installation

Install as a dev dependency:

# npm
npm install --save-dev @anygridtech/frappe-types

# yarn
yarn add --dev @anygridtech/frappe-types

# pnpm
pnpm add -D @anygridtech/frappe-types

⚙️ Setup

This package is designed to work with @anygridtech/frappe-ts-tools. You must set up frappe-ts-tools first:

👉 Follow @anygridtech/frappe-ts-tools Setup Instructions

The frappe-ts-tools package handles all TypeScript compilation and build configuration automatically.


🎈 Usage

After setup, you can use Frappe globals with full TypeScript support:

frappe.call({
  method: "frappe.client.get",
  args: {
    doctype: "Customer",
    name: "CUST-0001"
  },
  callback(r) {
    console.log(r.message);
  }
});

🚀 Deployment

This is a type-only package. Just include it in your dev dependencies — no runtime deployment required.


⛏️ Built Using


🤝 Contributing

This project is a community effort.
Contributions are welcome! Open an issue or PR if you find missing or incorrect types.


✍️ Authors


🎉 Acknowledgements

  • Frappe community for documentation and examples
  • Inspiration from open-source type definition projects