Skip to content

Commit

Permalink
[Typescript] Add Breadcrumb.d.ts file
Browse files Browse the repository at this point in the history
Add typescript type definition for Breadcrumbs, so that
it can be type checked.
  • Loading branch information
driusan committed Nov 13, 2023
1 parent 57379f2 commit da7f624
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions jsx/Breadcrumbs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';

type breadcrumb = {
text: string
onClick?: (e: React.MouseEvent) => void
}

type breadcrumbProps = {
baseURL: string,
breadcrumbs: breadcrumb[],
};


class Breadcrumbs {
props: breadcrumbProps
state: {displayCount: number}
context: object
refs: {[key: string]: ReactInstance}

constructor(props: breadcrumbProps)
render(): ReactNode
setState(newprops: object): void
forceUpdate(): void
}

export default Breadcrumbs;

0 comments on commit da7f624

Please sign in to comment.