Skip to content

Commit

Permalink
alrighty
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Apr 14, 2023
1 parent f5d5165 commit 175c5a1
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"rollup.watch": "rollup --watch --config",
"start": "npm run watch",
"test": "jest --coverage",
"test.analysis": "cd test && npm i && npm run analysis.build-and-analyze",
"test.analysis": "cd test && npm run analysis.build-and-analyze",
"test.bundlers": "cd test && npm run bundlers",
"test.dist": "node scripts/build --validate-build",
"test.end-to-end": "cd test/end-to-end && npm ci && npm test && npm run test.dist",
Expand Down
31 changes: 23 additions & 8 deletions test/docs-json/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"src/components/interfaces.ts::Pie": {
"declaration": "export interface Pie {\n type: 'pumpkin' | 'apple' | 'pecan';\n name: string;\n diameter: number;\n}",
"docstring": "",
"docstring": "Interface that should be included",
"path": "src/components/interfaces.ts"
},
"src/components/interfaces.ts::FooBar": {
Expand All @@ -80,17 +80,32 @@
},
"src/components/interfaces.ts::FizzBuzz": {
"declaration": "export enum FizzBuzz {\n One,\n Two,\n Three,\n}",
"docstring": "",
"docstring": "Enum that should be included",
"path": "src/components/interfaces.ts"
},
"src/components/test-not-used.ts::NotUsedInterface": {
"declaration": "export interface NotUsedInterface {\n test: string;\n}",
"docstring": "",
"src/components/test-not-used.ts::ReExportedUnderNewNameWithType": {
"declaration": "export interface ReExportedUnderNewNameWithType {\n test: string;\n}",
"docstring": "If I show up then a re-export w/ alias and `export type` works!",
"path": "src/components/test-not-used.ts"
},
"src/components/test-not-used.ts::AnotherInterface": {
"declaration": "export interface AnotherInterface {\n test: string;\n}",
"docstring": "",
"src/components/test-not-used.ts::ReExportedUnderNewName": {
"declaration": "export interface ReExportedUnderNewName {\n test: string;\n}",
"docstring": "If I show up then a re-export w/ alias works!",
"path": "src/components/test-not-used.ts"
},
"src/components/test-not-used.ts::ReExportedWithType": {
"declaration": "export interface ReExportedWithType {\n test: string;\n}",
"docstring": "If I show up then a re-export w/ `export type` works!",
"path": "src/components/test-not-used.ts"
},
"src/components/test-not-used.ts::ReExported": {
"declaration": "export interface ReExported {\n test: string;\n}",
"docstring": "If I show up then a re-export works!",
"path": "src/components/test-not-used.ts"
},
"src/components/test-not-used.ts::IncludedInWildcard": {
"declaration": "export interface IncludedInWildcard {\n test: string;\n}",
"docstring": "If I show up then a `export * from '...'` works!",
"path": "src/components/test-not-used.ts"
}
}
Expand Down
20 changes: 19 additions & 1 deletion test/docs-json/src/components/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
/**
* Interface that should be included
*/
export interface Pie {
type: 'pumpkin' | 'apple' | 'pecan';
name: string;
diameter: number;
}

/**
* Type that should be included
*
*/
export type FooBar = {
biz: string;
};

/**
* Enum that should be included
*/
export enum FizzBuzz {
One,
Two,
Three,
}

export type { NotUsedInterface as BestInterface } from './test-not-used';
// re-export w/ alias and `export type`, should be under original name in `docs.json`
export type { ReExportedUnderNewNameWithType as BestInterface } from './test-not-used';
// re-export w/ alias, should be under original name in `docs.json`
export { ReExportedUnderNewName as BetterInterface } from './test-not-used';
// re-export w/ `export type`
export type { ReExportedWithType } from './test-not-used';
// re-export
export { ReExported } from './test-not-used';

export * from './test-not-used';
31 changes: 29 additions & 2 deletions test/docs-json/src/components/test-not-used.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
export interface NotUsedInterface {
/**
* If I show up then a re-export w/ alias and `export type` works!
*/
export interface ReExportedUnderNewNameWithType {
test: string;
}

export interface AnotherInterface {
/**
* If I show up then a re-export w/ alias works!
*/
export interface ReExportedUnderNewName {
test: string;
}

/**
* If I show up then a re-export works!
*/
export interface ReExported {
test: string;
}

/**
* If I show up then a re-export w/ `export type` works!
*/
export interface ReExportedWithType {
test: string;
}

/**
* If I show up then a `export * from '...'` works!
*/
export interface IncludedInWildcard {
test: string;
}

0 comments on commit 175c5a1

Please sign in to comment.