From 9212319fc52beacb3bdd640adc0109836ea11ba8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 6 Feb 2017 07:02:33 +0900 Subject: [PATCH] Happy typings --- src/general.ts | 2 +- src/plugins/amazon.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/general.ts b/src/general.ts index 0a28a3a..2f3f27f 100644 --- a/src/general.ts +++ b/src/general.ts @@ -28,7 +28,7 @@ export default async (url: URL.Url): Promise => { return null; } - const $: client.CheerioStaticEx = res.$; + const $ = res.$; let title = $('meta[property="og:title"]').attr('content') || diff --git a/src/plugins/amazon.ts b/src/plugins/amazon.ts index 5267518..e31a3c9 100644 --- a/src/plugins/amazon.ts +++ b/src/plugins/amazon.ts @@ -23,11 +23,11 @@ export function test(url: URL.Url) { export async function summary(url: URL.Url) { const res = await client.fetch(url.href); - const $: client.CheerioStaticEx = res.$; + const $ = res.$; - const title: string = $('#title').text(); + const title = $('#title').text(); - const description: string = + const description = $('#productDescription').text() || $('meta[name="description"]').attr('content');