Browse Source

Use 'import type' to import types, eliminate webpack warnings (#358)

pull/359/head
Matthias Frey 3 years ago
committed by GitHub
parent
commit
63ee33b685
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/api/src/app/access/access.controller.ts
  2. 2
      apps/api/src/app/account/account.controller.ts
  3. 2
      apps/api/src/app/admin/admin.controller.ts
  4. 2
      apps/api/src/app/auth-device/auth-device.controller.ts
  5. 2
      apps/api/src/app/auth/web-auth.service.ts
  6. 2
      apps/api/src/app/cache/cache.controller.ts
  7. 2
      apps/api/src/app/experimental/experimental.controller.ts
  8. 2
      apps/api/src/app/export/export.controller.ts
  9. 2
      apps/api/src/app/import/import.controller.ts
  10. 2
      apps/api/src/app/order/order.controller.ts
  11. 2
      apps/api/src/app/portfolio/portfolio.controller.ts
  12. 2
      apps/api/src/app/portfolio/portfolio.service.ts
  13. 2
      apps/api/src/app/subscription/subscription.controller.ts
  14. 2
      apps/api/src/app/symbol/symbol.controller.ts
  15. 2
      apps/api/src/app/user/user.controller.ts
  16. 12
      libs/common/src/lib/types/index.ts

2
apps/api/src/app/access/access.controller.ts

@ -1,5 +1,5 @@
import { Access } from '@ghostfolio/common/interfaces'; import { Access } from '@ghostfolio/common/interfaces';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { Controller, Get, Inject, UseGuards } from '@nestjs/common'; import { Controller, Get, Inject, UseGuards } from '@nestjs/common';
import { REQUEST } from '@nestjs/core'; import { REQUEST } from '@nestjs/core';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';

2
apps/api/src/app/account/account.controller.ts

@ -6,7 +6,7 @@ import {
hasPermission, hasPermission,
permissions permissions
} from '@ghostfolio/common/permissions'; } from '@ghostfolio/common/permissions';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Body, Body,
Controller, Controller,

2
apps/api/src/app/admin/admin.controller.ts

@ -5,7 +5,7 @@ import {
hasPermission, hasPermission,
permissions permissions
} from '@ghostfolio/common/permissions'; } from '@ghostfolio/common/permissions';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Controller, Controller,
Get, Get,

2
apps/api/src/app/auth-device/auth-device.controller.ts

@ -4,7 +4,7 @@ import {
hasPermission, hasPermission,
permissions permissions
} from '@ghostfolio/common/permissions'; } from '@ghostfolio/common/permissions';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Controller, Controller,
Delete, Delete,

2
apps/api/src/app/auth/web-auth.service.ts

@ -2,7 +2,7 @@ import { AuthDeviceDto } from '@ghostfolio/api/app/auth-device/auth-device.dto';
import { AuthDeviceService } from '@ghostfolio/api/app/auth-device/auth-device.service'; import { AuthDeviceService } from '@ghostfolio/api/app/auth-device/auth-device.service';
import { UserService } from '@ghostfolio/api/app/user/user.service'; import { UserService } from '@ghostfolio/api/app/user/user.service';
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration.service';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Inject, Inject,
Injectable, Injectable,

2
apps/api/src/app/cache/cache.controller.ts

@ -1,6 +1,6 @@
import { CacheService } from '@ghostfolio/api/app/cache/cache.service'; import { CacheService } from '@ghostfolio/api/app/cache/cache.service';
import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.service'; import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.service';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { Controller, Inject, Post, UseGuards } from '@nestjs/common'; import { Controller, Inject, Post, UseGuards } from '@nestjs/common';
import { REQUEST } from '@nestjs/core'; import { REQUEST } from '@nestjs/core';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';

2
apps/api/src/app/experimental/experimental.controller.ts

@ -1,7 +1,7 @@
import { baseCurrency, benchmarks } from '@ghostfolio/common/config'; import { baseCurrency, benchmarks } from '@ghostfolio/common/config';
import { DATE_FORMAT } from '@ghostfolio/common/helper'; import { DATE_FORMAT } from '@ghostfolio/common/helper';
import { isApiTokenAuthorized } from '@ghostfolio/common/permissions'; import { isApiTokenAuthorized } from '@ghostfolio/common/permissions';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Body, Body,
Controller, Controller,

2
apps/api/src/app/export/export.controller.ts

@ -1,5 +1,5 @@
import { Export } from '@ghostfolio/common/interfaces'; import { Export } from '@ghostfolio/common/interfaces';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { Controller, Get, Inject, UseGuards } from '@nestjs/common'; import { Controller, Get, Inject, UseGuards } from '@nestjs/common';
import { REQUEST } from '@nestjs/core'; import { REQUEST } from '@nestjs/core';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';

2
apps/api/src/app/import/import.controller.ts

@ -1,5 +1,5 @@
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration.service';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Body, Body,
Controller, Controller,

2
apps/api/src/app/order/order.controller.ts

@ -6,7 +6,7 @@ import {
hasPermission, hasPermission,
permissions permissions
} from '@ghostfolio/common/permissions'; } from '@ghostfolio/common/permissions';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Body, Body,
Controller, Controller,

2
apps/api/src/app/portfolio/portfolio.controller.ts

@ -11,7 +11,7 @@ import {
PortfolioSummary PortfolioSummary
} from '@ghostfolio/common/interfaces'; } from '@ghostfolio/common/interfaces';
import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface'; import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Controller, Controller,
Get, Get,

2
apps/api/src/app/portfolio/portfolio.service.ts

@ -32,7 +32,7 @@ import {
TimelinePosition TimelinePosition
} from '@ghostfolio/common/interfaces'; } from '@ghostfolio/common/interfaces';
import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface'; import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface';
import { import type {
DateRange, DateRange,
OrderWithAccount, OrderWithAccount,
RequestWithUser RequestWithUser

2
apps/api/src/app/subscription/subscription.controller.ts

@ -1,5 +1,5 @@
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration.service';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Body, Body,
Controller, Controller,

2
apps/api/src/app/symbol/symbol.controller.ts

@ -1,4 +1,4 @@
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Controller, Controller,
Get, Get,

2
apps/api/src/app/user/user.controller.ts

@ -4,7 +4,7 @@ import {
hasPermission, hasPermission,
permissions permissions
} from '@ghostfolio/common/permissions'; } from '@ghostfolio/common/permissions';
import { RequestWithUser } from '@ghostfolio/common/types'; import type { RequestWithUser } from '@ghostfolio/common/types';
import { import {
Body, Body,
Controller, Controller,

12
libs/common/src/lib/types/index.ts

@ -1,10 +1,10 @@
import { AccessWithGranteeUser } from './access-with-grantee-user.type'; import type { AccessWithGranteeUser } from './access-with-grantee-user.type';
import { DateRange } from './date-range.type'; import type { DateRange } from './date-range.type';
import { Granularity } from './granularity.type'; import type { Granularity } from './granularity.type';
import { OrderWithAccount } from './order-with-account.type'; import type { OrderWithAccount } from './order-with-account.type';
import { RequestWithUser } from './request-with-user.type'; import type { RequestWithUser } from './request-with-user.type';
export { export type {
AccessWithGranteeUser, AccessWithGranteeUser,
DateRange, DateRange,
Granularity, Granularity,

Loading…
Cancel
Save