Skip to content

Commit e8f8e74

Browse files
committed
Merge pull request DefinitelyTyped#8796 from unional/patch-1
Add resolve-from
2 parents a3282fd + 2a9c63c commit e8f8e74

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

resolve-from/resolve-from-tests.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// <reference path="resolve-from.d.ts" />
2+
3+
// Much better testing in https://github.com/typed-typings/typed-resolve-from
4+
if (typeof resolveFrom !== 'function') {
5+
throw new Error('resolveFrom is not a function');
6+
}

resolve-from/resolve-from.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Type definitions for resolve-from
2+
// Project: https://github.com/sindresorhus/resolve-from
3+
// Definitions by: unional <https://github.com/unional>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
declare function resolveFrom(fromDir: string, moduleId: string): string;
6+
7+
declare module "resolve-from" {
8+
export = resolveFrom;
9+
}

0 commit comments

Comments
 (0)