-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(app): migrate App source to TypeScript (#7550)
Co-authored-by: Mike Cousins <[email protected]> Co-authored-by: Shlok Amin <[email protected]> Co-authored-by: Ian London <[email protected]>
- Loading branch information
1 parent
223b88d
commit d00cbf9
Showing
835 changed files
with
11,235 additions
and
10,863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# type caches | ||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// @flow | ||
// mock portal for enzyme tests | ||
import * as React from 'react' | ||
|
||
type Props = {| children: React.Node |} | ||
interface Props { | ||
children: React.ReactNode | ||
} | ||
|
||
// replace Portal with a pass-through React.Fragment | ||
export const Portal = ({ children }: Props): React.Node => <>{children}</> | ||
export const Portal = ({ children }: Props): JSX.Element => <>{children}</> | ||
|
||
export const PortalRoot = (): React.Node => <></> | ||
export const TopPortalRoot = (): React.Node => <></> | ||
export const PortalRoot = (): JSX.Element => <></> | ||
export const TopPortalRoot = (): JSX.Element => <></> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
// mock logger for tests | ||
import path from 'path' | ||
import type { Logger } from '../logger' | ||
|
||
export function createLogger(filename) { | ||
export function createLogger(filename: string): Logger { | ||
const label = path.relative(path.join(__dirname, '../../..'), filename) | ||
|
||
// @ts-expect-error | ||
return new Proxy( | ||
{}, | ||
{ | ||
get(_, level) { | ||
return (message, meta) => | ||
get(_, level: string) { | ||
return (message: string, meta: unknown) => | ||
console.log(`[${label}] ${level}: ${message} %j`, meta) | ||
}, | ||
} | ||
) | ||
} | ||
|
||
export const useLogger = filename => { | ||
export const useLogger = (filename: string): Logger => { | ||
return createLogger(filename) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
// @flow | ||
// TODO(mc, 2019-06-27): replace this mock with one in shared-data based on | ||
// jest.fn and glob | ||
|
||
export function getLegacyLabwareDef(loadName: ?string): null { | ||
export function getLegacyLabwareDef(loadName: string | null | undefined): null { | ||
return null | ||
} | ||
|
||
export function getLatestLabwareDef(loadName: ?string): null { | ||
export function getLatestLabwareDef(loadName: string | null | undefined): null { | ||
return null | ||
} |
Oops, something went wrong.