Skip to content

Feat/639 #1196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
02aad30
Merge pull request #2 from TypeStrong/feat/639
paztis Jan 30, 2020
b8a6d42
correct good export naming in library mode
Jan 30, 2020
44b98fc
correct good export naming in library mode: unit test update
Jan 30, 2020
754ec6e
[module naming] fix remaining index.d after module naming. Remove use…
Feb 4, 2020
fd02c12
update declaration ".d" removal unit test
Feb 4, 2020
4b48ba9
update double quote removal in unit tests
Feb 4, 2020
b2874ce
correct unit tests for double quote useless escaping
Feb 4, 2020
8ba5964
in case of mono-repo (node_modules outside the project), trunk the mo…
Feb 5, 2020
55f62ad
library export declaration refactoring
Feb 5, 2020
9e90746
only consider the program files paths for basePath construction
Feb 5, 2020
ad615b3
wording fix
Feb 5, 2020
da313ad
update export specs
Feb 5, 2020
42ebbee
typescript getFullyQualifiedName wrapping to prefix by sourceFile nam…
Feb 6, 2020
db1f74f
typescript getFullyQualifiedName wrapping to prefix by sourceFile nam…
Feb 6, 2020
cf8ed0c
don't forgot to flag as exported the default case
Feb 6, 2020
33b12ae
always create ReferenceReflection in export {A} declaration: event if…
Feb 6, 2020
a7b2b36
referenceReflexion in namespaces fix: copy the sourcefile export logic
Feb 6, 2020
1d3556d
tslint fix
Feb 6, 2020
5eb1a7b
correct isExported support
May 4, 2020
c6765e7
update type reference management with real FQN
May 4, 2020
47fb938
correct export symbol comparison (do not base it only on name)
May 6, 2020
ebfd032
context remaining symbol reflections support added
May 6, 2020
f85c6b8
shortcut sub-modules namings by removing parent name from it
May 6, 2020
d24a418
add all referenceType symbol support
May 6, 2020
f61becc
upgrade typescript version
May 6, 2020
fcfc68b
remaining symbols declaration refactoring
May 11, 2020
cbb97ee
correct file extension problem in FQN generation
May 11, 2020
3ceae58
test specs alignment on updates
May 11, 2020
ccfcf4a
tslint
May 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/converter/factories/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { createComment } from './comment';
export { createDeclaration } from './declaration';
export { createParameter } from './parameter';
export { createReferenceType } from './reference';
export { createReferenceType, createReferenceReflection } from './reference';
export { createSignature } from './signature';
export { createTypeParameter } from './type-parameter';
16 changes: 13 additions & 3 deletions src/lib/converter/nodes/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as ts from 'typescript';
import { resolve } from 'path';

import { Reflection, ReflectionKind, ReflectionFlag } from '../../models/index';
import { createDeclaration } from '../factories/index';
import { createDeclaration, createReferenceReflection } from '../factories/index';
import { Context } from '../context';
import { Component, ConverterNodeComponent } from '../components';
import { BindOption, SourceFileMode } from '../../utils';
Expand Down Expand Up @@ -112,8 +112,18 @@ export class BlockConverter extends ConverterNodeComponent<ts.SourceFile|ts.Bloc

for (const symbol of context.checker.getExportsOfModule(moduleSymbol)) {
const resolved = context.resolveAliasedSymbol(symbol);
for (const declaration of resolved.declarations) {
this.owner.convertNode(context, declaration);

const declarationsProcess = () => {
for (const declaration of resolved.declarations) {
this.owner.convertNode(context, declaration);
}
};

if (symbol.getName() !== resolved.getName()) {
const reflection = createReferenceReflection(context, symbol, resolved);
context.withScope(reflection, declarationsProcess);
} else {
declarationsProcess();
}
}
}
Expand Down
Loading