Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions fixtures/api-gen/error/button/add-ns-enum.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/button' {
export namespace ButtonProps {
enum Severity {
Low,
High,
}
}
}
10 changes: 10 additions & 0 deletions fixtures/api-gen/error/button/add-ns-ns.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/button' {
export namespace ButtonProps {
namespace IconProps {
type Name = string;
}
}
}
8 changes: 8 additions & 0 deletions fixtures/api-gen/error/button/add-ns-value.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/button' {
export namespace ButtonProps {
export const fallback: string;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/button' {
export interface ButtonPropz {
children: React.ReactNode;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/button' {
export namespace ButtonPropz {
type IconName = string;
}
}
10 changes: 10 additions & 0 deletions fixtures/api-gen/error/button/remove-missing-member.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { Remove } from '@cloudscape-design/documenter/api-gen/markers';

declare module '@fixtures/upstream/button' {
export namespace ButtonProps {
type AltText = Remove;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { Remove } from '@cloudscape-design/documenter/api-gen/markers';

declare module '@fixtures/upstream/button' {
export interface ButtonProps {
altText: Remove;
}
}
6 changes: 6 additions & 0 deletions fixtures/api-gen/error/demo/no-augmentation.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

export interface DemoProps {
content?: string;
}
4 changes: 4 additions & 0 deletions fixtures/api-gen/error/demo/no-upstream-dts.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/internal' {}
4 changes: 4 additions & 0 deletions fixtures/api-gen/error/demo/no-upstream.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/unresolved' {}
10 changes: 10 additions & 0 deletions fixtures/api-gen/error/icon/place-taken-by-upstream.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// This patch sits in a directory called `icon` but proxies `button`, which itself imports
// `../icon/interfaces`. The consumer's name and the upstream component want the same place.
declare module '@fixtures/upstream/button' {
export interface ButtonProps {
iconName: never;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions fixtures/api-gen/valid/box/carry-imports.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { IconProps } from '@fixtures/upstream/icon';

declare module '@fixtures/upstream/box' {
export interface BoxProps {
icon?: IconProps;
}
}
4 changes: 4 additions & 0 deletions fixtures/api-gen/valid/box/empty.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/box' {}
10 changes: 10 additions & 0 deletions fixtures/api-gen/valid/box/override-nested-ns.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/box' {
export namespace BoxProps {
export interface VisualAccent {
color: BoxProps.VisualAccent.Color;
}
}
}
13 changes: 13 additions & 0 deletions fixtures/api-gen/valid/box/remove-nested-ns.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { Remove } from '@cloudscape-design/documenter/api-gen/markers';

declare module '@fixtures/upstream/box' {
export interface BoxProps {
visualAccent: Remove;
}
export namespace BoxProps {
export type VisualAccent = Remove;
}
}
11 changes: 11 additions & 0 deletions fixtures/api-gen/valid/button-alpha/interfaces.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { Remove } from '@cloudscape-design/documenter/api-gen/markers';

// Proxies the same upstream component as `valid/button`, at a second place in the proxy tree.
declare module '@fixtures/upstream/button' {
export interface ButtonProps {
children: Remove;
}
}
15 changes: 15 additions & 0 deletions fixtures/api-gen/valid/button/add-props.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/button' {
export interface ButtonProps {
/**
* Annotation API-docs
*/
annotation?: ButtonProps.Annotation;
}

export namespace ButtonProps {
export type Annotation = string;
}
}
18 changes: 18 additions & 0 deletions fixtures/api-gen/valid/button/carry-imports.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { Remove } from '@cloudscape-design/documenter/api-gen/markers';
import type { CheckboxProps } from '@fixtures/upstream/checkbox';
import * as BoxTypes from '@fixtures/upstream/box';
import '@fixtures/upstream/button';

declare module '@fixtures/upstream/button' {
export interface ButtonProps {
onClick: Remove;
/**
* Wrapper applied around the button content.
*/
wrapper?: BoxTypes.BoxProps;
toggle?: CheckboxProps;
}
}
4 changes: 4 additions & 0 deletions fixtures/api-gen/valid/button/empty.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/button' {}
12 changes: 12 additions & 0 deletions fixtures/api-gen/valid/button/marker-imports.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { FutureMarker, Remove as Drop } from '@cloudscape-design/documenter/api-gen/markers';
import * as ApiGen from '@cloudscape-design/documenter/api-gen/markers';

declare module '@fixtures/upstream/button' {
export interface ButtonProps {
onClick: Drop;
iconName: ApiGen.Remove;
}
}
13 changes: 13 additions & 0 deletions fixtures/api-gen/valid/button/remove-member.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { Remove } from '@cloudscape-design/documenter/api-gen/markers';

declare module '@fixtures/upstream/button' {
export interface ButtonProps {
iconName: Remove;
}
export namespace ButtonProps {
export type IconName = Remove;
}
}
10 changes: 10 additions & 0 deletions fixtures/api-gen/valid/button/remove-property.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import type { Remove } from '@cloudscape-design/documenter/api-gen/markers';

declare module '@fixtures/upstream/button' {
export interface ButtonProps {
iconName: Remove;
}
}
25 changes: 25 additions & 0 deletions fixtures/api-gen/valid/checkbox/override-props.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/checkbox' {
export interface BaseCheckboxProps {
/**
* ARIA label of the checkbox control
*/
ariaLabel: string;
}

export interface CheckboxProps {
/**
* Visible checkbox label
*/
children?: React.ReactNode;
}

export namespace CheckboxProps {
export interface EventDetail {
checked: boolean;
indeterminate: boolean;
}
}
}
8 changes: 8 additions & 0 deletions fixtures/api-gen/valid/custom-icon/interfaces.patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

declare module '@fixtures/upstream/icon' {
export interface IconProps {
tone?: string;
}
}
Loading
Loading