Skip to content

v3.0.0

Compare
Choose a tag to compare
@fwh1990 fwh1990 released this 26 May 08:57
· 13 commits to master since this release

Define parameters by tuple.

Before

import { Topic } from 'topic';

const topic = new Topic<{
  foo: (name: string, age: number) => void;
  bar: (x: boolean, y: number) => void;
}>();

After

import { Topic } from 'topic';

const topic = new Topic<{
  foo: [name: string, age: number];
  bar: [x: boolean, y: number];
}>();