8000 Deploy 2f8570d9aae6e8cbae545de8b4a352b58c2a7ff6 to NPM branch · rplansky/immutable-js@c2f9569 · GitHub
[go: up one dir, main page]

Skip to content

Commit c2f9569

Browse files
author
Travis CI
committed
Deploy 2f8570d to NPM branch
1 parent 5765661 commit c2f9569

File tree

5 files changed

+35
-9
lines changed

5 files changed

+35
-9
lines changed

dist/immutable-nonambient.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,12 @@
24462446
export interface Factory<TProps extends Object> {
24472447
(values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>;
24482448
new (values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>;
2449+
2450+
/**
2451+
* The name provided to `Record(values, name)` can be accessed with
2452+
* `displayName`.
2453+
*/
2454+
displayName: string;
24492455
}
24502456

24512457
export function Factory<TProps extends Object>(values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>;

dist/immutable.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,12 @@ declare module Immutable {
24462446
export interface Factory<TProps extends Object> {
24472447
(values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>;
24482448
new (values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>;
2449+
2450+
/**
2451+
* The name provided to `Record(values, name)` can be accessed with
2452+
* `displayName`.
2453+
*/
2454+
displayName: string;
24492455
}
24502456

24512457
export function Factory<TProps extends Object>(values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>;

dist/immutable.es.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5404,6 +5404,9 @@ var Record = function Record(defaultValues, name) {
54045404
hasInitialized = true;
54055405
var keys = Object.keys(defaultValues);
54065406
var indices = (RecordTypePrototype._indices = {});
5407+
// Deprecated: left to attempt not to break any external code which
5408+
// relies on a ._name property existing on record instances.
5409+
// Use Record.getDescriptiveName() instead
54075410
RecordTypePrototype._name = name;
54085411
RecordTypePrototype._keys = keys;
54095412
RecordTypePrototype._defaultValues = defaultValues;
@@ -5441,6 +5444,10 @@ var Record = function Record(defaultValues, name) {
54415444
));
54425445
RecordTypePrototype.constructor = RecordType;
54435446

5447+
if (name) {
5448+
RecordType.displayName = name;
5449+
}
5450+
54445451
return RecordType;
54455452
};
54465453

@@ -5581,7 +5588,7 @@ function makeRecord(likeRecord, values, ownerID) {
55815588
}
55825589

55835590
function recordName(record) {
5584-
return record._name || record.constructor.name || 'Record';
5591+
return record.constructor.displayName || record.constructor.name || 'Record';
55855592
}
55865593

55875594
function recordSeq(record) {

dist/immutable.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5410,6 +5410,9 @@
54105410
hasInitialized = true;
54115411
var keys = Object.keys(defaultValues);
54125412
var indices = (RecordTypePrototype._indices = {});
5413+
// Deprecated: left to attempt not to break any external code which
5414+
// relies on a ._name property existing on record instances.
5415+
// Use Record.getDescriptiveName() instead
54135416
RecordTypePrototype._name = name;
54145417
RecordTypePrototype._keys = keys;
54155418
RecordTypePrototype._defaultValues = defaultValues;
@@ -5447,6 +5450,10 @@
54475450
));
54485451
RecordTypePrototype.constructor = RecordType;
54495452

5453+
if (name) {
5454+
RecordType.displayName = name;
5455+
}
5456+
54505457
return RecordType;
54515458
};
54525459

@@ -5587,7 +5594,7 @@
55875594
}
55885595

55895596
function recordName(record) {
5590-
return record._name || record.constructor.name || 'Record';
5597+
return record.constructor.displayName || record.constructor.name || 'Record';
55915598
}
55925599

55935600
function recordSeq(record) {

0 commit comments

Comments
 (0)
0