From 6919409c2b642937686ef8a77e21ad9f321a2be8 Mon Sep 17 00:00:00 2001 From: August Skare Date: Tue, 20 Nov 2018 15:28:18 +0100 Subject: typedef for context data --- packages/dev-tools-pages/ts/context/compiler.tsx | 4 +++- packages/dev-tools-pages/ts/context/cov.tsx | 4 +++- packages/dev-tools-pages/ts/context/index.tsx | 9 ++++++++- packages/dev-tools-pages/ts/context/profiler.tsx | 4 +++- packages/dev-tools-pages/ts/context/trace.tsx | 4 +++- 5 files changed, 20 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/dev-tools-pages/ts/context/compiler.tsx b/packages/dev-tools-pages/ts/context/compiler.tsx index 88402e4f6..177e265e5 100644 --- a/packages/dev-tools-pages/ts/context/compiler.tsx +++ b/packages/dev-tools-pages/ts/context/compiler.tsx @@ -1,6 +1,8 @@ import Icon from 'ts/icons/logos/compiler.svg'; -export const context = { +import { ContextInterface } from './index'; + +export const context: ContextInterface = { title: 'sol-compiler', name: 'compiler', subtitle: 'Solidity compilation that just works', diff --git a/packages/dev-tools-pages/ts/context/cov.tsx b/packages/dev-tools-pages/ts/context/cov.tsx index eea3ccca6..1ade45e9d 100644 --- a/packages/dev-tools-pages/ts/context/cov.tsx +++ b/packages/dev-tools-pages/ts/context/cov.tsx @@ -1,6 +1,8 @@ import Icon from 'ts/icons/logos/cov.svg'; -export const context = { +import { ContextInterface } from './index'; + +export const context: ContextInterface = { title: 'sol-cov', name: 'cov', subtitle: 'Solidity code coverage', diff --git a/packages/dev-tools-pages/ts/context/index.tsx b/packages/dev-tools-pages/ts/context/index.tsx index 3aba2f34c..35c647ad6 100644 --- a/packages/dev-tools-pages/ts/context/index.tsx +++ b/packages/dev-tools-pages/ts/context/index.tsx @@ -6,7 +6,14 @@ interface ContextInterface { subtitle?: string; tagline?: string; icon?: React.ReactNode; - colors?: any; + colors?: { + main: string; + secondary: string; + secondary_alt: string; + type: string; + type_alt: string; + dark: string; + }; } const ThemeContext = createContext({}); diff --git a/packages/dev-tools-pages/ts/context/profiler.tsx b/packages/dev-tools-pages/ts/context/profiler.tsx index 507fa663d..5ccfa5b4c 100644 --- a/packages/dev-tools-pages/ts/context/profiler.tsx +++ b/packages/dev-tools-pages/ts/context/profiler.tsx @@ -1,6 +1,8 @@ import Icon from 'ts/icons/logos/profiler.svg'; -export const context = { +import { ContextInterface } from './index'; + +export const context: ContextInterface = { title: 'sol-profiler', name: 'profiler', subtitle: 'Gas profiling for Solidity', diff --git a/packages/dev-tools-pages/ts/context/trace.tsx b/packages/dev-tools-pages/ts/context/trace.tsx index fea72d4c2..9627cc0a4 100644 --- a/packages/dev-tools-pages/ts/context/trace.tsx +++ b/packages/dev-tools-pages/ts/context/trace.tsx @@ -1,6 +1,8 @@ import Icon from 'ts/icons/logos/trace.svg'; -export const context = { +import { ContextInterface } from './index'; + +export const context: ContextInterface = { title: 'sol-trace', name: 'trace', subtitle: 'Human-readable stack traces', -- cgit