mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
596 B
TypeScript
28 lines
596 B
TypeScript
//// [tests/cases/compiler/declarationEmitOptionalMethod.ts] ////
|
|
|
|
//// [declarationEmitOptionalMethod.ts]
|
|
export const Foo = (opts: {
|
|
a?(): void,
|
|
b?: () => void,
|
|
}): {
|
|
c?(): void,
|
|
d?: () => void,
|
|
} => ({ });
|
|
|
|
//// [declarationEmitOptionalMethod.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Foo = void 0;
|
|
const Foo = (opts) => ({});
|
|
exports.Foo = Foo;
|
|
|
|
|
|
//// [declarationEmitOptionalMethod.d.ts]
|
|
export declare const Foo: (opts: {
|
|
a?(): void;
|
|
b?: () => void;
|
|
}) => {
|
|
c?(): void;
|
|
d?: () => void;
|
|
};
|