Skip to content

Commit 985de04

Browse files
authored
Upgrade typescript to 3.7.1-rc (codesandbox#2948)
* Upgrade typescript to 3.7.1-rc * Fix typings
1 parent 7e39089 commit 985de04

File tree

12 files changed

+66
-64
lines changed

12 files changed

+66
-64
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@
8585
"husky": "^2.2.0",
8686
"lerna": "^3.16.4",
8787
"lint-staged": "^9.2.5",
88-
"prettier": "1.17.0",
88+
"prettier": "1.18.2",
8989
"pretty-quick": "^1.10.0",
90-
"typescript": "3.6.3",
90+
"typescript": "3.7.1-rc",
9191
"username": "^5.1.0"
9292
},
9393
"husky": {

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
"terser": "^4.1.4",
312312
"terser-webpack-plugin": "^1.4.1",
313313
"thread-loader": "^2.1.2",
314-
"typescript": "3.6.3",
314+
"typescript": "3.7.1-rc",
315315
"url-loader": "1.0.1",
316316
"webpack": "^4.36.1",
317317
"webpack-bundle-analyzer": "^2.13.1",

packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/NewSandboxModal/elements.ts

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const Container = styled.main<{
3838
height: 100%;
3939
overflow: hidden;
4040
`};
41-
`}
41+
`};
4242
`;
4343

4444
export const TabContainer = styled.div<{
@@ -59,7 +59,7 @@ export const TabContainer = styled.div<{
5959
overflow: hidden;
6060
${delayOutEffect(0)};
6161
`};
62-
`}
62+
`};
6363
`;
6464

6565
export const InnerContainer = styled.div<{
@@ -77,7 +77,7 @@ export const InnerContainer = styled.div<{
7777
padding: 0;
7878
${delayOutEffect(0)};
7979
`};
80-
`}
80+
`};
8181
`;
8282

8383
export const Templates = styled.div`
@@ -129,38 +129,37 @@ const activeStyles = css`
129129
${({ theme }) => css`
130130
background: ${theme.background};
131131
color: white;
132-
`}
132+
`};
133133
`;
134134

135135
export const Button = styled.button<{
136-
selected: boolean;
136+
selected?: boolean;
137137
}>`
138-
${({ selected, theme }) => css`
139-
position: relative;
140-
padding: 1rem 2rem;
141-
margin: 0;
142-
border: none;
143-
background: ${theme.background2};
144-
color: rgba(255, 255, 255, 0.5);
145-
font-family: 'Roboto', sans-serif;
146-
font-size: 0.875rem;
147-
font-weight: 500;
148-
text-transform: uppercase;
149-
transition: 0.15s ease all;
150-
cursor: pointer;
151-
152-
${selected &&
153-
css`
154-
${activeStyles};
155-
`};
138+
position: relative;
139+
padding: 1rem 2rem;
140+
margin: 0;
141+
border: none;
142+
background: ${props => props.theme.background2};
143+
color: rgba(255, 255, 255, 0.5);
144+
font-family: 'Roboto', sans-serif;
145+
font-size: 0.875rem;
146+
font-weight: 500;
147+
text-transform: uppercase;
148+
transition: 0.15s ease all;
149+
cursor: pointer;
156150
157-
&:focus {
158-
color: white;
159-
}
160-
&:hover {
161-
color: white;
162-
}
163-
`}
151+
${props =>
152+
props.selected &&
153+
css`
154+
${activeStyles};
155+
`};
156+
157+
&:focus {
158+
color: white;
159+
}
160+
&:hover {
161+
color: white;
162+
}
164163
`;
165164

166165
export const Title = styled.h2`

packages/app/src/app/pages/Sandbox/Editor/Header/Buttons/Action/elements.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,22 @@ export const ActionA = styled.a<OptionProps>`
9191
export const ActionTooltip = styled(Tooltip)<
9292
OptionProps & { disabledAction?: boolean }
9393
>`
94-
${({ disabledAction, theme }) => css`
95-
${styles};
96-
${disabledAction &&
97-
css`
98-
color: ${theme.light
99-
? css`rgba(0,0,0,0.3)`
100-
: css`rgba(255,255,255,0.3)`};
101-
cursor: default;
94+
${styles};
10295
103-
&:hover {
104-
color: ${theme.light
105-
? css`rgba(0,0,0,0.4)`
106-
: css`rgba(255,255,255,0.4)`};
107-
}
108-
`};
109-
`}
96+
${props =>
97+
props.disabledAction &&
98+
css`
99+
color: ${props.theme.light
100+
? css`rgba(0,0,0,0.3)`
101+
: css`rgba(255,255,255,0.3)`};
102+
cursor: default;
103+
104+
&:hover {
105+
color: ${props.theme.light
106+
? css`rgba(0,0,0,0.4)`
107+
: css`rgba(255,255,255,0.4)`};
108+
}
109+
`};
110110
`;
111111

112112
export const IconContainer = styled.div`

packages/app/src/app/pages/common/ErrorBoundary/CodeSadbox/CodeSadbox.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ export const CodeSadbox: React.FC<IFallbackComponentProps> = ({
6262
Back to Home
6363
</Button>
6464
)}
65-
{/*
66-
// @ts-ignore */}
65+
6766
<Button
6867
small
6968
target="_blank"

packages/codesandbox-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"tslint-config-prettier": "^1.1.0",
9595
"tslint-config-standard": "^6.0.0",
9696
"typedoc": "^0.7.1",
97-
"typescript": "3.6.3",
97+
"typescript": "3.7.1-rc",
9898
"uuid": "^3.3.2",
9999
"validate-commit-msg": "^2.12.2"
100100
},

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"jest-styled-components": "^6.3.3",
108108
"jest-svg-transformer": "^1.0.0",
109109
"rimraf": "^2.6.3",
110-
"typescript": "3.6.3",
110+
"typescript": "3.7.1-rc",
111111
"yarn": "^1.17.3"
112112
}
113113
}

packages/common/src/components/Button/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export type Props = {
1515
danger?: boolean;
1616
secondary?: boolean;
1717
red?: boolean;
18+
target?: string;
19+
rel?: string;
1820
};
1921

2022
function ButtonComponent({ style = {}, ...props }: Props) {

packages/common/src/components/Input/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import styled, { css } from 'styled-components';
22

3-
export const styles = css<{
3+
export interface IInputProps {
44
block?: boolean;
55
fullWidth?: boolean;
66
error?: boolean;
7-
}>`
7+
}
8+
9+
export const styles = css<IInputProps>`
810
transition: 0.3s ease border-color;
911
background-color: ${props =>
1012
props.theme['input.background'] || 'rgba(0, 0, 0, 0.3)'};
@@ -27,11 +29,11 @@ export const styles = css<{
2729
}
2830
`;
2931

30-
const Input = styled.input`
32+
const Input = styled.input<IInputProps>`
3133
${styles};
3234
`;
3335

34-
export const TextArea = styled.textarea`
36+
export const TextArea = styled.textarea<IInputProps>`
3537
${styles};
3638
`;
3739

standalone-packages/react-sandpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"tslint-config-prettier": "^1.1.0",
127127
"tslint-config-standard": "^7.0.0",
128128
"typedoc": "^0.10.0",
129-
"typescript": "3.6.3",
129+
"typescript": "3.7.1-rc",
130130
"validate-commit-msg": "^2.12.2"
131131
},
132132
"peerDependencies": {

0 commit comments

Comments
 (0)