Skip to content

Commit

Permalink
Merge pull request DefinitelyTyped#34459 from ajilo297/master
Browse files Browse the repository at this point in the history
Type Definitions for package project-name
  • Loading branch information
DanielRosenwasser authored Apr 9, 2019
2 parents dc8d8c4 + c955b76 commit 12494c4
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
11 changes: 11 additions & 0 deletions types/project-name/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Type definitions for project-name 1.0
// Project: https://github.com/jonschlinkert/project-name
// Definitions by: Ajil Oommen <https://github.com/ajilo297>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export = index;
/**
* Type Definition for project-name
* @param cwd The Base Current Working Directory of project
*/
declare function index(cwd?: string): string;
4 changes: 4 additions & 0 deletions types/project-name/project-name-tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import name = require('project-name');

name('d'); // $ExpectType string
name(); // $ExpectType string
23 changes: 23 additions & 0 deletions types/project-name/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"project-name-tests.ts"
]
}
1 change: 1 addition & 0 deletions types/project-name/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

0 comments on commit 12494c4

Please sign in to comment.