Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2fc6ca

Browse files
author
okan.cetin
committed
#000 okan add object.assign support
1 parent40453ac commitb2fc6ca

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"redux-ts",
3-
"version":"2.5.1",
3+
"version":"2.5.2",
44
"description":"Utils to define redux reducer/action in typescript",
55
"main":"lib/index.js",
66
"typings":"lib/src/index.d.ts",

‎src/utils/browserPolyfill.ts‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,30 @@ if (Function.prototype.name === undefined && Object.defineProperty !== undefined
1111
},
1212
set:function(value){}
1313
});
14+
}
15+
16+
/*
17+
* Polyfill for Object.assign
18+
* https://github.com/Microsoft/TypeScript/issues/3429#issuecomment-173213973
19+
*/
20+
if(typeofObject.assign!='function'){
21+
Object.assign=function(target:any){
22+
'use strict';
23+
if(target==null){
24+
thrownewTypeError('Cannot convert undefined or null to object');
25+
}
26+
27+
target=Object(target);
28+
for(varindex=1;index<arguments.length;index++){
29+
varsource=arguments[index];
30+
if(source!=null){
31+
for(varkeyinsource){
32+
if(Object.prototype.hasOwnProperty.call(source,key)){
33+
target[key]=source[key];
34+
}
35+
}
36+
}
37+
}
38+
returntarget;
39+
};
1440
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp