Skip to content

Commit

Permalink
Remove string literal unions
Browse files Browse the repository at this point in the history
  • Loading branch information
dgetu committed Mar 9, 2024
1 parent aaf0279 commit 57b0c75
Show file tree
Hide file tree
Showing 12 changed files with 425 additions and 849 deletions.
272 changes: 234 additions & 38 deletions sdk/search/search-documents/review/search-documents.api.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions sdk/search/search-documents/scripts/generateTestVarNames.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env -S perl -i

use Algorithm::Combinatorics qw(variations_with_repetition);
use Iterator;

use v5.38;

sub id_iterator {
my $i = 1;
my $j = 0;
my @arr = variations_with_repetition( [ 'a' .. 'z' ], $i );
return Iterator->new(
sub {
if ( $j > $#arr ) {
$j = 0;
@arr = variations_with_repetition( [ 'a' .. 'z' ], ++$i );
}
return join( '', @{ $arr[ $j++ ] } );
}
);
}

my $iter = id_iterator();
my $str = $iter->value();
while (<>) {
s/(?<=^\s{0,125}const\s{0,125})\w*?(?=:)/$str/ems
&& ( $str = $iter->value() );
print;
}
2 changes: 1 addition & 1 deletion sdk/search/search-documents/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

export const SDK_VERSION: string = "12.1.0-beta.1";
const SDK_VERSION: string = "12.1.0-beta.1";
Loading

0 comments on commit 57b0c75

Please sign in to comment.