<@U01JB1UGDV4> got two of your issues in here
# general
t
@Ross Coundon got two of your issues in here
r
Nice one! Thank you
Is it 0.41.1 rather than 0.40.1?
t
good catch 😬 - updated in github
r
np. The reason I noticed was that the vpc and securityGroup properties still seem to be readonly
Is this the correct import?
Copy code
import { FunctionProps } from '@serverless-stack/resources';
t
That should be yes
r
It looks like FunctionProps extends FunctionOptions which has those properties as readonly and so I'm still getting the compiler error
t
ah didn't realize the fields you were having trouble with were coming from cdk
r
yeah, seems so, indirectly
t
Yeah I guess you have to define your own type still - can you try this?
Copy code
type Writable = {
    -readonly [K in keyof FunctionProps]: FunctionProps[K];
};
The other option would be to write the code in a way where you're creating the object all at once
r
Neat, that works and is a more generic way of doing it than I had with my original DefaultProps type
t
I'll consider doing this on our end, just need to think about why they have this as readonly in the first place
r
yeah, good point. I could be relying on something that is subject to change
The other issue regarding setDefaultRemovalPolicy is fixed 😄