diff --git a/src/features/particles/Particles.vue b/src/features/particles/Particles.vue
index d5ecdcb..04307d0 100644
--- a/src/features/particles/Particles.vue
+++ b/src/features/particles/Particles.vue
@@ -46,7 +46,7 @@ export default defineComponent({
                     backgroundAlpha: 0
                 });
                 resizeListener.value?.appendChild(app.value.view);
-                props.onInit(app.value as Application);
+                props.onInit?.(app.value as Application);
             }
             updateBounds();
             if (props.onHotReload) {
diff --git a/src/game/layers.tsx b/src/game/layers.tsx
index e8d22c3..ea40350 100644
--- a/src/game/layers.tsx
+++ b/src/game/layers.tsx
@@ -35,7 +35,7 @@ export interface FeatureNode {
  * An injection key that a {@link Context} will use to provide a function that registers a {@link FeatureNode} with the given id and HTML element.
  */
 export const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =
-    Symbol("RegisterNode"); 
+    Symbol("RegisterNode");
 /**
  * An injection key that a {@link Context} will use to provide a function that unregisters a {@link FeatureNode} with the given id.
  */
@@ -196,7 +196,9 @@ export function createLayer<T extends LayerOptions>(
         const layer = {} as T & Partial<BaseLayer>;
         const emitter = (layer.emitter = createNanoEvents<LayerEvents>());
         layer.on = emitter.on.bind(emitter);
-        layer.emit = emitter.emit.bind(emitter);
+        layer.emit = emitter.emit.bind(emitter) as <K extends keyof LayerEvents>(
+            ...args: [K, ...Parameters<LayerEvents[K]>]
+        ) => void;
         layer.nodes = ref({});
         layer.id = id;