1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-24 06:54:27 +07:00

build: updated typescript to 3.5.2 (#91)

This commit is contained in:
Thomas Klein 2019-07-09 10:48:00 +02:00 committed by Juan Picado @jotadeveloper
parent c667bea33b
commit 6afc2c0e54
5 changed files with 8 additions and 10 deletions

View File

@ -89,7 +89,7 @@
"stylelint-webpack-plugin": "0.10.5",
"supertest": "4.0.2",
"typeface-roboto": "0.0.54",
"typescript": "3.4.5",
"typescript": "3.5.2",
"url-loader": "1.1.2",
"validator": "10.11.0",
"verdaccio": "4.0.3",

View File

@ -71,7 +71,6 @@ describe('App', () => {
await handleDoLogin('sam', '1234');
const result = {
username: 'sam',
token: 'TEST_TOKEN',
};
expect(wrapper.state('isUserLoggedIn')).toBeTruthy();
expect(wrapper.state('showLoginModal')).toBeFalsy();

View File

@ -86,7 +86,7 @@ export default class App extends Component<{}, AppStateInterface> {
this.handleLogout();
} else {
this.setState({
user: { username, token },
user: { username },
isUserLoggedIn: true,
});
}
@ -153,7 +153,6 @@ export default class App extends Component<{}, AppStateInterface> {
this.setState({
user: {
username,
token,
},
isUserLoggedIn: true, // close login modal after successful login
showLoginModal: false, // set isUserLoggedIn to true

View File

@ -7,8 +7,8 @@ export interface DetailPage {
}
export async function callDetailPage(packageName): Promise<DetailPage> {
const readMe = await API.request(`package/readme/${packageName}`, 'GET');
const packageMeta = await API.request(`sidebar/${packageName}`, 'GET');
const readMe = await API.request<string | {}>(`package/readme/${packageName}`, 'GET');
const packageMeta = await API.request<PackageMetaInterface | {}>(`sidebar/${packageName}`, 'GET');
return { readMe, packageMeta };
}

View File

@ -13059,10 +13059,10 @@ typeface-roboto@0.0.54:
resolved "https://registry.npmjs.org/typeface-roboto/-/typeface-roboto-0.0.54.tgz#8f02c9a18d1cfa7f49381a6ff0d21ff061f38ad2"
integrity sha512-sOFA1FXgP0gOgBYlS6irwq6hHYA370KE3dPlgYEJHL3PJd5X8gQE0RmL79ONif6fL5JZuGDj+rtOrFeOqz5IZQ==
typescript@3.4.5:
version "3.4.5"
resolved "https://registry.verdaccio.org/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
typescript@3.5.2:
version "3.5.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
ua-parser-js@^0.7.18:
version "0.7.19"