Skip to content

Commit 239b90c

Browse files
committed
yay
1 parent 500a3f6 commit 239b90c

File tree

1 file changed

+7
-6
lines changed
  • apps/repl/app/components/limber/layout

1 file changed

+7
-6
lines changed

apps/repl/app/components/limber/layout/index.gts

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
// need to Fix something in ember-statechart-component
2-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
3-
// @ts-nocheck
41
import { assert } from '@ember/debug';
5-
import { fn, hash } from '@ember/helper';
2+
import { fn } from '@ember/helper';
63

74
import { modifier } from 'ember-modifier';
85

@@ -14,12 +11,16 @@ import { ResizeHandle } from './resize-handle';
1411
import { isHorizontalSplit, LayoutState, setupResizeObserver } from './state';
1512

1613
import type { TOC } from '@ember/component/template-only';
14+
import type { ReactiveActorFrom } from 'ember-statechart-component';
15+
16+
type ReactiveActor = ReactiveActorFrom<typeof LayoutState>;
1717

1818
const setupState = modifier((element: Element, [send]: [(event: string) => void]) => {
1919
assert(`Element is not resizable`, element instanceof HTMLElement);
2020

2121
let observer = setupResizeObserver(() => send('RESIZE'));
2222

23+
// @ts-expect-error need to fix the type of this for ember-statechart-component
2324
send({
2425
type: 'CONTAINER_FOUND',
2526
container: element,
@@ -37,15 +38,15 @@ const effect = (fn: (...args: unknown[]) => void) => {
3738
fn();
3839
};
3940

40-
const isResizable = (state) => {
41+
const isResizable = (state: ReactiveActor) => {
4142
return !(state.matches('hasContainer.minimized') || state.matches('hasContainer.maximized'));
4243
};
4344

4445
/**
4546
* true for horizontally split
4647
* false for vertically split
4748
*/
48-
const containerDirection = (state) => {
49+
const containerDirection = (state: ReactiveActor) => {
4950
if (state.matches('hasContainer.default.horizontallySplit')) {
5051
return true;
5152
}

0 commit comments

Comments
 (0)