-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Remove internal platform types exports #50427
Changes from 2 commits
57f6499
7e58aa1
b0fb799
fce48c7
5800b06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { InternalElasticsearchServiceSetup } from './elasticsearch'; | ||
import { InternalHttpServiceSetup } from './http'; | ||
import { InternalUiSettingsServiceSetup } from './ui_settings'; | ||
import { ContextSetup } from './context'; | ||
import { SavedObjectsServiceStart } from './saved_objects'; | ||
|
||
/** @internal */ | ||
export interface InternalCoreSetup { | ||
context: ContextSetup; | ||
http: InternalHttpServiceSetup; | ||
elasticsearch: InternalElasticsearchServiceSetup; | ||
uiSettings: InternalUiSettingsServiceSetup; | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export interface InternalCoreStart { | ||
savedObjects: SavedObjectsServiceStart; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -449,11 +449,11 @@ export interface AuthToolkit { | |
export class BasePath { | ||
// @internal | ||
constructor(serverBasePath?: string); | ||
get: (request: LegacyRequest | KibanaRequest<unknown, unknown, unknown>) => string; | ||
get: (request: KibanaRequest<unknown, unknown, unknown> | LegacyRequest) => string; | ||
prepend: (path: string) => string; | ||
remove: (path: string) => string; | ||
readonly serverBasePath: string; | ||
set: (request: LegacyRequest | KibanaRequest<unknown, unknown, unknown>, requestSpecificBasePath: string) => void; | ||
set: (request: KibanaRequest<unknown, unknown, unknown> | LegacyRequest, requestSpecificBasePath: string) => void; | ||
} | ||
|
||
// Warning: (ae-forgotten-export) The symbol "BootstrapArgs" needs to be exported by the entry point index.d.ts | ||
|
@@ -712,36 +712,6 @@ export interface IndexSettingsDeprecationInfo { | |
[indexName: string]: DeprecationInfo[]; | ||
} | ||
|
||
// @internal (undocumented) | ||
export interface InternalCoreSetup { | ||
// (undocumented) | ||
context: ContextSetup; | ||
// Warning: (ae-forgotten-export) The symbol "InternalElasticsearchServiceSetup" needs to be exported by the entry point index.d.ts | ||
// | ||
// (undocumented) | ||
elasticsearch: InternalElasticsearchServiceSetup; | ||
// Warning: (ae-forgotten-export) The symbol "InternalHttpServiceSetup" needs to be exported by the entry point index.d.ts | ||
// | ||
// (undocumented) | ||
http: InternalHttpServiceSetup; | ||
// (undocumented) | ||
uiSettings: InternalUiSettingsServiceSetup; | ||
} | ||
|
||
// @internal (undocumented) | ||
export interface InternalCoreStart { | ||
// Warning: (ae-forgotten-export) The symbol "SavedObjectsServiceStart" needs to be exported by the entry point index.d.ts | ||
// | ||
// (undocumented) | ||
savedObjects: SavedObjectsServiceStart; | ||
} | ||
|
||
// @internal (undocumented) | ||
export interface InternalUiSettingsServiceSetup { | ||
asScopedToClient(savedObjectsClient: SavedObjectsClientContract): IUiSettingsClient; | ||
register(settings: Record<string, UiSettingsParams>): void; | ||
} | ||
|
||
// @public | ||
export interface IRouter { | ||
delete: <P extends ObjectType, Q extends ObjectType, B extends ObjectType>(route: RouteConfig<P, Q, B>, handler: RequestHandler<P, Q, B>) => void; | ||
|
@@ -839,7 +809,7 @@ export interface LegacyRequest extends Request { | |
|
||
// @public @deprecated (undocumented) | ||
export interface LegacyServiceSetupDeps { | ||
// Warning: (ae-incompatible-release-tags) The symbol "core" is marked as @public, but its signature references "InternalCoreSetup" which is marked as @internal | ||
// Warning: (ae-forgotten-export) The symbol "InternalCoreSetup" needs to be exported by the entry point index.d.ts | ||
// | ||
// (undocumented) | ||
core: InternalCoreSetup & { | ||
Comment on lines
811
to
815
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still needs to export There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's fine. Some of the doc warnings are ok if they're internal types. |
||
|
@@ -851,7 +821,7 @@ export interface LegacyServiceSetupDeps { | |
|
||
// @public @deprecated (undocumented) | ||
export interface LegacyServiceStartDeps { | ||
// Warning: (ae-incompatible-release-tags) The symbol "core" is marked as @public, but its signature references "InternalCoreStart" which is marked as @internal | ||
// Warning: (ae-forgotten-export) The symbol "InternalCoreStart" needs to be exported by the entry point index.d.ts | ||
// | ||
// (undocumented) | ||
core: InternalCoreStart & { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
server/types.ts
files statesThis module is intended for consumption by public to avoid import issues with server-side code
, so I created another file for our internal types. Tell me if this should be moved elsewhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate file is fine to me, but I think public and server should be consistent. Also I think the name should probably be something like
internal_types
rather thaninternal_setup
.