mirror of
https://github.com/outline/outline.git
synced 2026-11-25 23:24:06 +03:00
* Upgrade Mobx * fix: Enforce MobX action boundaries * fix: Wrap static observable updates in actions * Remove iteration tests
24 lines
522 B
TypeScript
24 lines
522 B
TypeScript
import { observable } from "mobx";
|
|
import type { UnfurlResourceType, UnfurlResponse } from "@shared/types";
|
|
import Model from "./base/Model";
|
|
|
|
class Unfurl<UnfurlType extends UnfurlResourceType> extends Model {
|
|
static modelName = "Unfurl";
|
|
|
|
constructor(fields: Record<string, unknown>, store: Model["store"]) {
|
|
super(fields, store);
|
|
this.initialize(fields);
|
|
}
|
|
|
|
@observable
|
|
type: UnfurlType;
|
|
|
|
@observable
|
|
data: UnfurlResponse[UnfurlType];
|
|
|
|
@observable
|
|
fetchedAt: string;
|
|
}
|
|
|
|
export default Unfurl;
|