Skip to content

Commit

Permalink
lets try that again
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyUnderStars committed Sep 29, 2023
1 parent 71a6450 commit c06438f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "activitypub-types",
"version": "1.1.0",
"version": "1.1.1",
"description": "ActivityPub Typescript types",
"main": "./dist/index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/model-interfaces/actors/application.interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { APObject } from "../common/object.interface";
import { APActor } from "./actor.interface";

export type APApplication = APActor & { type: "Application" };

export const ActorIsApplication = (actor: APActor): actor is APApplication => {
export const ObjectIsApplication = (
actor: APObject,
): actor is APApplication => {
return actor.type == "Application";
};
3 changes: 2 additions & 1 deletion src/model-interfaces/actors/group.interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { APObject } from "../common/object.interface";
import { APActor } from "./actor.interface";

export type APGroup = APActor & { type: "Group" };

export const ActorIsGroup = (actor: APActor): actor is APGroup => {
export const ObjectIsGroup = (actor: APObject): actor is APGroup => {
return actor.type == "Group";
};
5 changes: 3 additions & 2 deletions src/model-interfaces/actors/organization.interface.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { APObject } from "../common/object.interface";
import { APActor } from "./actor.interface";

export type APOrganization = APActor & { type: "Organization" };

export const ActorIsOrganization = (
actor: APActor,
export const ObjectIsOrganization = (
actor: APObject,
): actor is APOrganization => {
return actor.type == "Organization";
};
3 changes: 2 additions & 1 deletion src/model-interfaces/actors/person.interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { APObject } from "../common/object.interface";
import { APActor } from "./actor.interface";

export type APPerson = APActor & { type: "Person" };

export const ActorIsPerson = (actor: APActor): actor is APPerson => {
export const ObjectIsPerson = (actor: APObject): actor is APPerson => {
return actor.type == "Person";
};
3 changes: 2 additions & 1 deletion src/model-interfaces/actors/service.interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { APObject } from "../common/object.interface";
import { APActor } from "./actor.interface";

export type APService = APActor & { type: "Service" };

export const ActorIsService = (actor: APActor): actor is APService => {
export const ObjectIsService = (actor: APObject): actor is APService => {
return actor.type == "Service";
};

0 comments on commit c06438f

Please sign in to comment.