Browse Source

Organize exports

Properly define exports.
master
TheoryOfNekomata 8 months ago
parent
commit
3320c11f64
3 changed files with 7 additions and 8 deletions
  1. +6
    -7
      src/common/app.ts
  2. +1
    -0
      src/common/index.ts
  3. +0
    -1
      src/index.ts

+ 6
- 7
src/common/app.ts View File

@@ -1,11 +1,10 @@
import {Resource} from './resource';
import {Language} from './language';
import {MediaType} from './media-type';
import {Charset} from './charset';
import {FALLBACK_LANGUAGE, Language} from './language';
import {FALLBACK_MEDIA_TYPE, MediaType} from './media-type';
import {Charset, FALLBACK_CHARSET} from './charset';
import * as v from 'valibot';
import {BackendBuilder, createBackend, CreateBackendParams} from '../backend';
import {ClientBuilder, createClient, CreateClientParams} from '../client';
import {FALLBACK_CHARSET, FALLBACK_LANGUAGE, FALLBACK_MEDIA_TYPE} from './index';

type ApplicationMap<T extends { name: string }> = Map<T['name'], T>;

@@ -34,13 +33,13 @@ export const application = (appParams: ApplicationParams): ApplicationBuilder =>
const appState: ApplicationState = {
name: appParams.name,
resources: new Set<Resource<any>>(),
languages: new Map<Language["name"], Language>([
languages: new Map<Language['name'], Language>([
[FALLBACK_LANGUAGE.name, FALLBACK_LANGUAGE],
]),
mediaTypes: new Map<MediaType["name"], MediaType>([
mediaTypes: new Map<MediaType['name'], MediaType>([
[FALLBACK_MEDIA_TYPE.name, FALLBACK_MEDIA_TYPE],
]),
charsets: new Map<Charset["name"], Charset>([
charsets: new Map<Charset['name'], Charset>([
[FALLBACK_CHARSET.name, FALLBACK_CHARSET],
]),
};


+ 1
- 0
src/common/index.ts View File

@@ -7,6 +7,7 @@ export * from './charset';
export * from './media-type';
export * from './resource';
export * from './language';
export * as validation from './validation';

export interface ContentNegotiation {
language: Language;


+ 0
- 1
src/index.ts View File

@@ -1,4 +1,3 @@
export * from './common';
export * as validation from './common/validation';

export * as dataSources from './backend/data-sources';

Loading…
Cancel
Save