Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/esign/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SuperDoc } from 'superdoc'; // eslint-disable-line
import type { SuperDoc } from 'superdoc';

Check failure on line 1 in packages/esign/src/types.ts

View workflow job for this annotation

GitHub Actions / validate

'SuperDoc' is defined but never used

export type FieldValue = string | boolean | number | null | undefined;
export type TableFieldValue = string[][];
Expand Down
2 changes: 1 addition & 1 deletion packages/template-builder/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useState, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react';
import type { SuperDoc } from 'superdoc';
import type { SuperDoc } from 'superdoc'; // requires superdoc >=1.24.2 for correct types
import type * as Types from './types';
import { FieldMenu, FieldList } from './defaults';
import { areTemplateFieldsEqual, resolveToolbar, clampToViewport, getPresentationEditor } from './utils';
Expand All @@ -10,7 +10,7 @@
type Editor = NonNullable<SuperDoc['activeEditor']>;

const getTemplateFieldsFromEditor = (editor: Editor): Types.TemplateField[] => {
const structuredContentHelpers = (editor.helpers as any)?.structuredContentCommands;

Check warning on line 13 in packages/template-builder/src/index.tsx

View workflow job for this annotation

GitHub Actions / validate

Unexpected any. Specify a different type

if (!structuredContentHelpers?.getStructuredContentTags) {
return [];
Expand All @@ -18,7 +18,7 @@

const tags = structuredContentHelpers.getStructuredContentTags(editor.state) || [];

return tags.map((entry: any) => {

Check warning on line 21 in packages/template-builder/src/index.tsx

View workflow job for this annotation

GitHub Actions / validate

Unexpected any. Specify a different type
const node = entry?.node ?? entry;
const attrs = node?.attrs ?? {};
const nodeType = node?.type?.name || '';
Expand Down Expand Up @@ -349,7 +349,7 @@
const editor = instance.activeEditor;
const pe = getPresentationEditor(instance);

editor.on('update', ({ editor: e }: any) => {

Check warning on line 352 in packages/template-builder/src/index.tsx

View workflow job for this annotation

GitHub Actions / validate

Unexpected any. Specify a different type
const { state } = e;
const { from } = state.selection;

Expand All @@ -366,7 +366,7 @@
if (!editor) return;
const currentPos = editor.state.selection.from;
const tr = editor.state.tr.delete(triggerStart, currentPos);
(editor as any).view.dispatch(tr);

Check warning on line 369 in packages/template-builder/src/index.tsx

View workflow job for this annotation

GitHub Actions / validate

Unexpected any. Specify a different type
};

triggerCleanupRef.current = cleanup;
Expand Down Expand Up @@ -513,7 +513,7 @@
const editor = superdocRef.current?.activeEditor;
if (!editor) return;

const structuredContentHelpers = (editor.helpers as any)?.structuredContentCommands;

Check warning on line 516 in packages/template-builder/src/index.tsx

View workflow job for this annotation

GitHub Actions / validate

Unexpected any. Specify a different type

if (!structuredContentHelpers) return;

Expand Down
Loading