Skip to content

Commit

Permalink
misc build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
YousefED committed May 15, 2024
1 parent 50c3954 commit a2f2e4e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
9 changes: 6 additions & 3 deletions packages/engine/src/mobx/customAnnotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ export const customAnnotation: Annotation = createCustomAnnotation();
export function createCustomAnnotation(options?: object): Annotation {
return {
annotationType_: "custom",
decorate_20223_: () => {
throw new Error("not implemented");
},
options_: options,
make_: function (
this: any,
adm: ObservableObjectAdministration,
key: PropertyKey,
descriptor: PropertyDescriptor,
source: object
source: object,
) {
return defaultAnnotation.make_.call(this, adm, key, descriptor, source);
} as any,
Expand All @@ -34,7 +37,7 @@ export function createCustomAnnotation(options?: object): Annotation {
adm: ObservableObjectAdministration,
key: PropertyKey,
descriptor: PropertyDescriptor,
proxyTrap: boolean
proxyTrap: boolean,
) {
if (React.isValidElement(descriptor.value)) {
return observable.ref.extend_(adm, key, descriptor, proxyTrap);
Expand All @@ -47,7 +50,7 @@ export function createCustomAnnotation(options?: object): Annotation {
adm,
key,
descriptor,
proxyTrap
proxyTrap,
);
}
} as any,
Expand Down
2 changes: 1 addition & 1 deletion packages/frame/src/EditorStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class EditorStore {
const findParent = (
searchId: string,
parentId: string | undefined,
children: Block[],
children: Block<any, any, any>[],
): string | undefined => {
for (const child of children) {
if (child.id === searchId) {
Expand Down
3 changes: 1 addition & 2 deletions packages/frame/src/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import styles from "./Frame.module.css";
import { RichTextContext } from "./RichTextContext";
import SourceModelCompiler from "./runtime/compiler/SourceModelCompiler";
import { MonacoContext } from "./runtime/editor/MonacoContext";
import { ExecutionHost } from "./runtime/executor/executionHosts/ExecutionHost";
import LocalExecutionHost from "./runtime/executor/executionHosts/local/LocalExecutionHost";

import { setMonacoDefaults } from "./runtime/editor";
Expand Down Expand Up @@ -264,7 +263,7 @@ export const Frame: React.FC<Props> = observer((props) => {
resolver.resolveImport,
);

const newExecutionHost: ExecutionHost = new LocalExecutionHost(
const newExecutionHost: LocalExecutionHost = new LocalExecutionHost(
props.documentIdString,
newCompiler,
monaco,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
onLoadDocumentPayload,
storePayload,
} from "@hocuspocus/server";
import { ChildReference } from "@typecell-org/shared";
import { ChildReference, Ref } from "@typecell-org/shared";
import {
createAnonClient,
createServiceClient,
Expand Down Expand Up @@ -187,7 +187,7 @@ export class SupabaseHocuspocus extends Database {

const serviceClient = await createServiceClient();

const refs = [...tr.doc.getMap("refs").values()]
const refs = [...tr.doc.getMap<Ref<any>>("refs").values()]
.filter(
(r) =>
r.namespace === ChildReference.namespace &&
Expand Down

0 comments on commit a2f2e4e

Please sign in to comment.