-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
206 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,3 +104,4 @@ dist | |
.tern-port | ||
|
||
lib | ||
temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"mainEntryPointFilePath": "./lib/index.d.ts", | ||
"bundledPackages": [ ], | ||
// 生成 api 报告,生成的还没 .d.ts 看的舒服,关了 | ||
"apiReport": { | ||
"enabled": false, | ||
"reportFolder": "./lib/" | ||
}, | ||
"docModel": { | ||
"enabled": true | ||
}, | ||
"dtsRollup": { | ||
"enabled": true, | ||
"untrimmedFilePath": "./lib/index.d.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* 1 + 1 | ||
* @returns 2 | ||
* @example | ||
* ```ts | ||
* add() => 2 | ||
* ``` | ||
* | ||
* @beta | ||
*/ | ||
export const add = () => 1 + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* 返回 hello 开头的字符串 | ||
* @param str - input string | ||
* @returns 'hello xxx' | ||
* @example | ||
* ```ts | ||
* hello('ts') => 'hello ts' | ||
* ``` | ||
* | ||
* @beta | ||
*/ | ||
export const hello = (str: string) => `hello ${str}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export default function myFirstFunc (str: string) { | ||
return `hello ${str}` | ||
} | ||
export * from './hello' | ||
export * from './add' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import assert from 'assert' | ||
import { add } from '../src/add' | ||
|
||
describe('validate:', () => { | ||
/** | ||
* add | ||
*/ | ||
describe('add', () => { | ||
test(' return 2 ', () => { | ||
assert.strictEqual(add(), 2) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import assert from 'assert' | ||
import { hello } from '../src/hello' | ||
|
||
describe('validate:', () => { | ||
/** | ||
* hello | ||
*/ | ||
describe('hello', () => { | ||
test(' return hello rollup ', () => { | ||
assert.strictEqual(hello('rollup'), 'hello rollup') | ||
}) | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.