Skip to content

Commit

Permalink
declare namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongin committed Jun 20, 2024
1 parent 311fd40 commit 9fac3e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NodeApi.Generator/TypeDefinitionsGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ interface IDisposable { dispose(): void; }
if (_emitDateTimeOffset)
{
s.Insert(insertIndex, _isSystemAssembly ? @"
namespace js { type DateTimeOffset = Date | { offset?: number } }
declare namespace js { type DateTimeOffset = Date | { offset?: number } }
" : @"
type DateTimeOffset = Date | { offset?: number }
");
Expand All @@ -755,7 +755,7 @@ namespace js { type DateTimeOffset = Date | { offset?: number } }
if (_emitDateTime)
{
s.Insert(insertIndex, _isSystemAssembly ? @"
namespace js { type DateTime = Date | { kind?: 'utc' | 'local' | 'unspecified' } }
declare namespace js { type DateTime = Date | { kind?: 'utc' | 'local' | 'unspecified' } }
" : @"
type DateTime = Date | { kind?: 'utc' | 'local' | 'unspecified' }
");
Expand Down

0 comments on commit 9fac3e2

Please sign in to comment.