diff --git a/.vscode/settings.json b/.vscode/settings.json
index 540b0cbdd7820..fcead90a75d0f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -15,5 +15,6 @@
"url": "/schema/site.schema.json"
}
],
- "editor.formatOnSave": true
+ "editor.formatOnSave": true,
+ "typescript.tsdk": "node_modules/typescript/lib"
}
diff --git a/package.json b/package.json
index a72ce772888cb..13bcbfdc593b6 100644
--- a/package.json
+++ b/package.json
@@ -170,7 +170,7 @@
"tslint": "^5.11.0",
"tslint-language-service": "^0.9.9",
"typedoc": "^0.13.0",
- "typescript": "^3.1.6",
+ "typescript": "^3.2.1",
"uglifyjs-webpack-plugin": "^1.2.4",
"utc-version": "^1.1.0",
"webpack": "^4.23.1",
diff --git a/web/src/auth/withAuthenticatedUser.tsx b/web/src/auth/withAuthenticatedUser.tsx
index eee13ffe3c491..5ad59606a66f2 100644
--- a/web/src/auth/withAuthenticatedUser.tsx
+++ b/web/src/auth/withAuthenticatedUser.tsx
@@ -2,18 +2,16 @@ import React from 'react'
import { Redirect } from 'react-router'
import * as GQL from '../../../shared/src/graphql/schema'
-type WithOptionalAuthenticatedUser
= Pick
> & {
- authenticatedUser: GQL.IUser | null
-}
-
/**
* Wraps a React component and requires an authenticated user. If the viewer is not authenticated, it redirects to
* the sign-in flow.
*/
export const withAuthenticatedUser =
(
Component: React.ComponentType
-): React.ComponentType> => props => {
- const { authenticatedUser } = props
+): React.ComponentType> & { authenticatedUser: GQL.IUser | null }> => ({
+ authenticatedUser,
+ ...props
+}) => {
// If not logged in, redirect to sign in.
if (!authenticatedUser) {
const newUrl = new URL(window.location.href)
@@ -22,5 +20,5 @@ export const withAuthenticatedUser =
}
- return
+ return
}
diff --git a/web/src/components/FilteredConnection.tsx b/web/src/components/FilteredConnection.tsx
index dda8fe638346e..b86d8755d8a2b 100644
--- a/web/src/components/FilteredConnection.tsx
+++ b/web/src/components/FilteredConnection.tsx
@@ -144,7 +144,7 @@ class ConnectionNodes, N, NP = {}> extends React.PureCom
public render(): JSX.Element | null {
const NodeComponent = this.props.nodeComponent
- const ListComponent = this.props.listComponent || 'ul'
+ const ListComponent: any = this.props.listComponent || 'ul' // TODO: remove cast when https://github.com/Microsoft/TypeScript/issues/28768 is fixed
const HeadComponent = this.props.headComponent
const FootComponent = this.props.footComponent
@@ -218,7 +218,7 @@ class ConnectionNodes, N, NP = {}> extends React.PureCom
}
const nodes = this.props.connection.nodes.map((node, i) => (
-
+
))
return (
diff --git a/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx b/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx
index f7ab78745d1bd..4b54ce905b756 100644
--- a/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx
+++ b/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx
@@ -18,11 +18,11 @@ export const ProductSubscriptionLabel: React.FunctionComponent<{
planField?: 'name' | 'nameWithBrand'
className?: string
-}> = ({ productSubscription, planField = 'nameWithBrand', className = '' }) => (
+}> = ({ productSubscription, planField, className = '' }) => (
{productSubscription.invoiceItem ? (
<>
- {productSubscription.invoiceItem.plan[planField]} (
+ {productSubscription.invoiceItem.plan[planField || 'nameWithBrand']} (
{formatUserCount(productSubscription.invoiceItem.userCount)})
>
) : productSubscription.activeLicense && productSubscription.activeLicense.info ? (
diff --git a/yarn.lock b/yarn.lock
index a88f42e3d2812..91f03f7b93f42 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -14461,11 +14461,16 @@ typedoc@^0.13.0:
typedoc-default-themes "^0.5.0"
typescript "3.1.x"
-typescript@3.1.x, typescript@^3.1.6:
+typescript@3.1.x:
version "3.1.6"
resolved "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==
+typescript@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz#0b7a04b8cf3868188de914d9568bd030f0c56192"
+ integrity sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg==
+
ua-parser-js@^0.7.18:
version "0.7.19"
resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b"