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

@deskthing/types

v0.11.18

Published

TypeScript types and interfaces for DeskThing

Readme

DeskThing Types

TypeScript type definitions for the DeskThing application framework.

Installation

Install types

npm install @deskthing/types

Create new DeskThing app

npm create deskthing@latest

or

npx @deskthing/cli template

Install core packages

npm install @deskthing/client @deskthing/server

Core Types

Actions

  • Action - Defines an executable action with properties like id, name, value, etc.
  • ActionReference - Reference to an action with minimal properties
  • EventMode - Enum for different input event types (KeyUp, KeyDown, Swipes, etc.)
  • Key - Defines a key mapping with modes and metadata

App Events

  • ServerEvent - Enum for server-side events (MESSAGE, DATA, GET, etc.)
  • SEND_TYPES - Enum for client-to-server communication types
  • GetTypes - Types for 'get' event requests

Client

  • ClientManifest - Client details like name, version, device info
  • ClientPreferences - User preferences for client appearance/behavior
  • App - Interface for app state in client
  • KeyTrigger - Interface for key trigger events

Tasks

  • Task - Defines a task with steps and metadata
  • Step - Base interface for task steps
  • TaskStep - Standard step in a task
  • TaskAction - Step requiring action execution
  • TaskSetting - Step requiring settings input
  • STEP_TYPES - Enum for different step types

Settings

  • SettingsType - Union type of all setting types
  • SettingsNumber - Number input setting
  • SettingsBoolean - Boolean toggle setting
  • SettingsString - Text input setting
  • SettingsSelect - Dropdown select setting
  • SettingsMultiSelect - Multiple selection setting
  • SettingsColor - Color picker setting
  • AppSettings - Record of app settings

Music

  • SongData - Current playing song information
  • ThemeColor - Color theme information
  • AUDIO_REQUESTS - Enum for audio control requests

Utils

  • AppManifest - Application manifest type
  • PlatformTypes - Supported platform types
  • TagTypes - App categorization tags
  • LOGGING_LEVELS - Log level types
  • SocketData - Socket communication data type

Usage

import { Action, ServerEvent, ClientManifest } from "@deskthing/types";
import { DeskThing } from "@deskthing/server";

// Define an action
const myAction: Action = {
  id: "my-action",
  name: "My Action",
  version: "1.0.0",
  enabled: true,
};

DeskThing.registerAction(myAction);

DeskThing.on(ServerEvent.ACTION, (event) => {
  // Handle action event
});
// Handle server events
function handleEvent(event: ServerEvent) {
  switch (event) {
    case ServerEvent.DATA:
      // Handle data event
      break;
    case ServerEvent.ACTION:
      // Handle action event
      break;
  }
}

License

MIT