From 5ec467d2c03f98a6070361caf5727dece6327c29 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 7 Jul 2022 14:57:23 -0400 Subject: got rid of typings for ReactTextareaAutocomplete to avoid react warnings. --- src/typings/index.d.ts | 84 ++++++++++++++------------------------------------ 1 file changed, 23 insertions(+), 61 deletions(-) (limited to 'src/typings') diff --git a/src/typings/index.d.ts b/src/typings/index.d.ts index bc7727426..23e4680fd 100644 --- a/src/typings/index.d.ts +++ b/src/typings/index.d.ts @@ -1,7 +1,6 @@ /// declare module 'googlephotos'; -declare module 'react-image-lightbox-with-rotate'; declare module 'cors'; declare module 'webrtc-adapter'; @@ -43,7 +42,7 @@ declare module '@react-pdf/renderer' { * used as children of another react-pdf component. In addition, it should * only have childs of type . */ - class Document extends React.Component { } + class Document extends React.Component {} interface NodeProps { style?: Style | Style[]; @@ -84,7 +83,7 @@ declare module '@react-pdf/renderer' { * you want, but ensure not rendering a page inside any component besides * Document. */ - class Page extends React.Component { } + class Page extends React.Component {} interface ViewProps extends NodeProps { /** @@ -101,7 +100,7 @@ declare module '@react-pdf/renderer' { * The most fundamental component for building a UI and is designed to be * nested inside other views and can have 0 to many children. */ - class View extends React.Component { } + class View extends React.Component {} interface ImageProps extends NodeProps { debug?: boolean; @@ -113,7 +112,7 @@ declare module '@react-pdf/renderer' { * A React component for displaying network or local (Node only) JPG or * PNG images, as well as base64 encoded image strings. */ - class Image extends React.Component { } + class Image extends React.Component {} interface TextProps extends NodeProps { /** @@ -122,9 +121,7 @@ declare module '@react-pdf/renderer' { */ wrap?: boolean; debug?: boolean; - render?: ( - props: { pageNumber: number; totalPages: number }, - ) => React.ReactNode; + render?: (props: { pageNumber: number; totalPages: number }) => React.ReactNode; children?: React.ReactNode; /** * How much hyphenated breaks should be avoided. @@ -136,7 +133,7 @@ declare module '@react-pdf/renderer' { * A React component for displaying text. Text supports nesting of other * Text or Link components to create inline styling. */ - class Text extends React.Component { } + class Text extends React.Component {} interface LinkProps extends NodeProps { /** @@ -153,13 +150,13 @@ declare module '@react-pdf/renderer' { * A React component for displaying an hyperlink. Link’s can be nested * inside a Text component, or being inside any other valid primitive. */ - class Link extends React.Component { } + class Link extends React.Component {} interface NoteProps extends NodeProps { children: string; } - class Note extends React.Component { } + class Note extends React.Component {} interface BlobProviderParams { blob: Blob | null; @@ -178,7 +175,7 @@ declare module '@react-pdf/renderer' { * @see https://react-pdf.org/advanced#on-the-fly-rendering * @platform web */ - class BlobProvider extends React.Component { } + class BlobProvider extends React.Component {} interface PDFViewerProps { width?: number; @@ -192,16 +189,14 @@ declare module '@react-pdf/renderer' { * Iframe PDF viewer for client-side generated documents. * @platform web */ - class PDFViewer extends React.Component { } + class PDFViewer extends React.Component {} interface PDFDownloadLinkProps { document: React.ReactElement; fileName?: string; style?: Style | Style[]; className?: string; - children?: - | React.ReactNode - | ((params: BlobProviderParams) => React.ReactNode); + children?: React.ReactNode | ((params: BlobProviderParams) => React.ReactNode); } /** @@ -209,7 +204,7 @@ declare module '@react-pdf/renderer' { * @see https://react-pdf.org/advanced#on-the-fly-rendering * @platform web */ - class PDFDownloadLink extends React.Component { } + class PDFDownloadLink extends React.Component {} interface EmojiSource { url: string; @@ -222,28 +217,17 @@ declare module '@react-pdf/renderer' { data: any; [key: string]: any; } - type HyphenationCallback = ( - words: string[], - glyphString: { [key: string]: any }, - ) => string[]; + type HyphenationCallback = (words: string[], glyphString: { [key: string]: any }) => string[]; const Font: { - register: ( - src: string, - options: { family: string;[key: string]: any }, - ) => void; + register: (src: string, options: { family: string; [key: string]: any }) => void; getEmojiSource: () => EmojiSource; getRegisteredFonts: () => string[]; registerEmojiSource: (emojiSource: EmojiSource) => void; - registerHyphenationCallback: ( - hyphenationCallback: HyphenationCallback, - ) => void; + registerHyphenationCallback: (hyphenationCallback: HyphenationCallback) => void; getHyphenationCallback: () => HyphenationCallback; getFont: (fontFamily: string) => RegisteredFont | undefined; - load: ( - fontFamily: string, - document: React.ReactElement, - ) => Promise; + load: (fontFamily: string, document: React.ReactElement) => Promise; clear: () => void; reset: () => void; }; @@ -257,7 +241,7 @@ declare module '@react-pdf/renderer' { width: number; height: number; orientation: Orientation; - }, + } ) => Style; flatten: (...styles: Style[]) => Style; absoluteFillObject: { @@ -278,12 +262,10 @@ declare module '@react-pdf/renderer' { type: string; props: { [key: string]: any }; }, - root?: any, + root?: any ) => any; - const pdf: ( - document: React.ReactElement, - ) => { + const pdf: (document: React.ReactElement) => { isDirty: () => boolean; updateContainer: (document: React.ReactElement) => void; toBuffer: () => NodeJS.ReadableStream; @@ -291,15 +273,9 @@ declare module '@react-pdf/renderer' { toString: () => string; }; - const renderToStream: ( - document: React.ReactElement, - ) => NodeJS.ReadableStream; + const renderToStream: (document: React.ReactElement) => NodeJS.ReadableStream; - const renderToFile: ( - document: React.ReactElement, - filePath: string, - callback?: (output: NodeJS.ReadableStream, filePath: string) => any, - ) => Promise; + const renderToFile: (document: React.ReactElement, filePath: string, callback?: (output: NodeJS.ReadableStream, filePath: string) => any) => Promise; const render: typeof renderToFile; } @@ -319,19 +295,5 @@ declare module '@react-pdf/renderer' { const pdf: typeof ReactPDF.pdf; export default ReactPDF; - export { - Document, - Page, - View, - Image, - Text, - Link, - Note, - Font, - StyleSheet, - createInstance, - PDFRenderer, - version, - pdf, - }; -} \ No newline at end of file + export { Document, Page, View, Image, Text, Link, Note, Font, StyleSheet, createInstance, PDFRenderer, version, pdf }; +} -- cgit v1.2.3-70-g09d2