Skip to content

Commit

Permalink
Use TypeScript bundler module resolution #10322
Browse files Browse the repository at this point in the history
The TypeScript language service benefits from this option by allowing
import auto-discovery to leverage any exports defined for a package.
This is particularly useful for packages such as `@angular/material`
which makes extensive use of secondary package exports.
  • Loading branch information
PowerKiKi committed Jul 17, 2024
1 parent 82b9d43 commit 69aba37
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions projects/natural-editor/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

export {NaturalCustomCssDirective} from './lib/custom-css/custom-css.directive';
export {NaturalEditorComponent} from './lib/editor/editor.component';
export {ImageUploader} from './lib/utils/image';
3 changes: 1 addition & 2 deletions projects/natural/src/lib/classes/apollo-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {ApolloLink, DocumentNode} from '@apollo/client/core';
import {isObject} from 'lodash-es';
import {formatIsoDateTime} from './utility';
import {HttpBatchLink, HttpLink, Options} from 'apollo-angular/http';
import {ExtractFiles} from 'apollo-angular/http/types';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
import extractFiles from 'extract-files/extractFiles.mjs';
Expand Down Expand Up @@ -57,7 +56,7 @@ export function isMutation(query: DocumentNode): boolean {
);
}

export const naturalExtractFiles: ExtractFiles = body => extractFiles(body, isExtractableFile);
export const naturalExtractFiles: NonNullable<Options['extractFiles']> = body => extractFiles(body, isExtractableFile);

/**
* Create an Apollo link that supports batched queries and file uploads.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Public API Surface of natural-search dropdown components
*/
export {TypeSelectConfiguration, TypeSelectComponent} from './type-select/type-select.component';
export {TypeSelectConfiguration, TypeSelectItem, TypeSelectComponent} from './type-select/type-select.component';

export {
TypeSelectNaturalConfiguration,
Expand Down
6 changes: 5 additions & 1 deletion projects/natural/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export * from './lib/services/abstract-model.service';
export {NaturalDebounceService} from './lib/services/debounce.service';
export * from './lib/services/enum.service';
export * from './lib/services/link-mutation.service';
export {NaturalPersistenceService, NATURAL_PERSISTENCE_VALIDATOR} from './lib/services/persistence.service';
export {
NaturalPersistenceService,
NATURAL_PERSISTENCE_VALIDATOR,
PersistenceValidator,
} from './lib/services/persistence.service';
export * from './lib/services/swiss-parsing-date-adapter.service';

export {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"esModuleInterop": true,
"experimentalDecorators": true,
"module": "ES2022",
"moduleResolution": "node",
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"strict": true,
Expand Down

0 comments on commit 69aba37

Please sign in to comment.