[metascraper] Add types for metascraper (#46878)

This commit is contained in:
Florian Imdahl 2020-08-28 05:57:09 +02:00 committed by GitHub
parent c89b0fbbbd
commit 40c72bd5eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
119 changed files with 1317 additions and 0 deletions

10
types/metascraper-address/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-address 1.0
// Project: https://github.com/goodhood-eu/metascraper-address#readme
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperAddress = require('metascraper-address');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperAddress()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-address-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-amazon/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-amazon 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-amazon
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperAmazon = require('metascraper-amazon');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperAmazon()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-amazon-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-audio/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-audio 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-audio
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperAudio = require('metascraper-audio');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperAudio()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-audio-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-author/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-author 5.14
// Project: https://metascraper.js.org
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperAuthor = require('metascraper-author');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperAuthor()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-author-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

21
types/metascraper-clearbit/index.d.ts vendored Normal file
View File

@ -0,0 +1,21 @@
// Type definitions for metascraper-clearbit 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-clearbit
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as http from 'http';
import metascraper = require('metascraper');
declare namespace getData {
interface Options {
/** Any option provided here will passed to `got#options`. */
gotOpts?: http.ClientRequestArgs;
}
}
declare function getData(options?: getData.Options): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,19 @@
import metascraper = require('metascraper');
import metascraperClearbit = require('metascraper-clearbit');
const html = 'example';
const url = 'https://example.org';
const options: metascraperClearbit.Options = {
gotOpts: {
timeout: 10000,
},
};
metascraper([metascraperClearbit()])({ html, url }).then(data => {
data;
});
metascraper([metascraperClearbit(options)])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-clearbit-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-date/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-date 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-date
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperDate = require('metascraper-date');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperDate()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-date-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,17 @@
// Type definitions for metascraper-description 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-description
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare namespace getData {
interface Options {
/** Truncate the value extracted to a maximum size (default: `300`). */
truncateLength?: number;
}
}
declare function getData(options?: getData.Options): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,17 @@
import metascraper = require('metascraper');
import metascraperDescription = require('metascraper-description');
const html = 'example';
const url = 'https://example.org';
const options: metascraperDescription.Options = {
truncateLength: 150,
};
metascraper([metascraperDescription()])({ html, url }).then(data => {
data;
});
metascraper([metascraperDescription(options)])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-description-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-iframe/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-iframe 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-iframe
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperIframe = require('metascraper-iframe');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperIframe()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-iframe-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-image/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-image 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-image
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperImage = require('metascraper-image');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperImage()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-image-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-lang/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-lang 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-lang
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperLang = require('metascraper-lang');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperLang()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-lang-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,34 @@
// Type definitions for metascraper-logo-favicon 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-logo-favicon
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5
/// <reference types="node" />
import * as http from 'http';
import metascraper = require('metascraper');
declare namespace getData {
type PickDefaultFunction = (sizes: FaviconSize[]) => FaviconSize;
type PickFunction = (sizes: FaviconSize[], pickDefault: PickDefaultFunction) => FaviconSize;
interface FaviconSize {
rel?: string;
href: string;
sizes?: string;
url: string;
size: number;
}
interface Options {
/** Any option provided here will passed to `got#options`. */
gotOpts?: http.ClientRequestArgs;
/** Truncate the value extracted to a maximum size (default: `300`). */
pickFn?: PickFunction;
}
}
declare function getData(options?: getData.Options): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,25 @@
import metascraper = require('metascraper');
import metascraperLogoFavicon = require('metascraper-logo-favicon');
const html = 'example';
const url = 'https://example.org';
const pickFn: metascraperLogoFavicon.PickFunction = (sizes, pickDefault) => {
const appleTouchIcon = sizes.find(item => item.rel && item.rel.includes('apple'));
return appleTouchIcon || pickDefault(sizes);
};
const options: metascraperLogoFavicon.Options = {
pickFn,
gotOpts: {
timeout: 10000,
},
};
metascraper([metascraperLogoFavicon()])({ html, url }).then(data => {
data;
});
metascraper([metascraperLogoFavicon(options)])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-logo-favicon-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-logo/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-logo 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-logo
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperLogo = require('metascraper-logo');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperLogo()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-logo-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,42 @@
// Type definitions for metascraper-media-provider 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-media-provider
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare namespace getData {
type OnErrorFunction = (url: string, error: Error) => void;
type GetProxyFunction = (data: GetProxyData) => string;
interface GetProxyData {
url: string;
retryCount: number;
}
interface Options {
/**
* It specifies cache based on file system to be used by
* [youtube-dl](https://github.com/microlinkhq/metascraper/blob/master/packages/metascraper-media-provider/youtube-dl).
*/
cacheDir?: string;
/**
* It will be called to determinate if a proxy should be used for
* resolving the next request URL.
*/
getProxy?: GetProxyFunction;
/** A function to be called when something wrong happens. */
onError?: OnErrorFunction;
/**
* The maximum time allowed to wait until considering the request as
* timed out. Default is `30000`.
*/
timeout?: number;
/** It specifies a custom user agent. */
userAgent?: string;
}
}
declare function getData(options?: getData.Options): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,30 @@
import metascraper = require('metascraper');
import metascraperMediaProvider = require('metascraper-media-provider');
const html = 'example';
const url = 'https://example.org';
const getProxy: metascraperMediaProvider.GetProxyFunction = data => {
return data.url;
};
const onError: metascraperMediaProvider.OnErrorFunction = (url, error) => {
url; // $ExpectType string
error; // $ExpectType Error
};
const options: metascraperMediaProvider.Options = {
cacheDir: '/tmp/cache',
getProxy,
onError,
timeout: 10000,
userAgent: 'MyUserAgent 1.0',
};
metascraper([metascraperMediaProvider()])({ html, url }).then(data => {
data;
});
metascraper([metascraperMediaProvider(options)])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-media-provider-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-publisher/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-publisher 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-publisher
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperPublisher = require('metascraper-publisher');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperPublisher()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-publisher-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-readability 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-readability
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperReadability = require('metascraper-readability');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperReadability()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-readability-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-soundcloud/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-soundcloud 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-soundcloud
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperSoundcloud = require('metascraper-soundcloud');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperSoundcloud()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-soundcloud-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

14
types/metascraper-spotify/index.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
// Type definitions for metascraper-spotify 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-spotify
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare namespace getData {
function isValidUrl(config: { url: string }): boolean;
}
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperSpotify = require('metascraper-spotify');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperSpotify()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-spotify-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-title/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-title 5.14
// Project: https://metascraper.js.org
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperTitle = require('metascraper-title');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperTitle()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-title-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

14
types/metascraper-uol/index.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
// Type definitions for metascraper-uol 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-uol
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare namespace getData {
function isValidUrl(config: { url: string }): boolean;
}
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperUol = require('metascraper-uol');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperUol()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-uol-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

10
types/metascraper-url/index.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
// Type definitions for metascraper-url 5.14
// Project: https://metascraper.js.org
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare function getData(): metascraper.Rule;
export = getData;

View File

@ -0,0 +1,9 @@
import metascraper = require('metascraper');
import metascraperUrl = require('metascraper-url');
const html = 'example';
const url = 'https://example.org';
metascraper([metascraperUrl()])({ html, url }).then(data => {
data;
});

View File

@ -0,0 +1,6 @@
{
"dependencies": {
"metascraper": "^5.14.0"
},
"private": true
}

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"metascraper-url-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

Some files were not shown because too many files have changed in this diff Show More